Skip to content
StrIterMustPrev

StrIterMustPrev

Description

Aborting variant of StrIterPrev. Alias for IterMustPrev; see IterMustPrev for the full contract.

Parameters

Name Direction Description
si in Pointer to the StrIter cursor to step back.

Success

Cursor steps back one character; returns to the caller.

Failure

Does not return – aborts via LOG_FATAL when stepping back would leave the valid range.

Usage example (Cross-references)

Usage examples (Cross-references)
    
                if (!StrIterPeek(&si, &c) || !IS_DIGIT(c)) {
                    StrIterMustPrev(&si);
                    break;
                }
    
                if (!StrIterPeek(&si, &c) || !IS_DIGIT(c)) {
                    StrIterMustPrev(&si);
                    break;
                }
Last updated on