Skip to content

StrIterPos

StrIterPos

Description

Get current read position pointer

Parameters

Name Direction Description
mi in StrIter object

Success

Returns valid char pointer

Failure

Returns NULL_ITER_DATA if exhausted/invalid

Usage example (Cross-references)

Usage examples (Cross-references)
        if (StrIterRemainingLength(&si) >= 4) {
            if (StrIterPeek(&si) == 't') {
                const char *pos = StrIterPos(&si);
                if (pos && ZstrCompareN(pos, "true", 4) == 0) {
                    StrIterMove(&si, 4);
            if (StrIterRemainingLength(&si) >= 5) {
                if (StrIterPeek(&si) == 'f') {
                    const char *pos = StrIterPos(&si);
                    if (pos && ZstrCompareN(pos, "false", 5) == 0) {
                        StrIterMove(&si, 5);
        if (StrIterRemainingLength(&si) >= 4) {
            if (StrIterPeek(&si) == 'n') {
                const char *pos = StrIterPos(&si);
                if (pos && ZstrCompareN(pos, "null", 4) == 0) {
                    StrIterMove(&si, 4);
Last updated on