StrIterPos

Table of Contents

StrIterPos

Description

Get current read position pointer

Parameters

NameDirectionDescription
miinStrIter object

Success

Returns valid char pointer

Failure

Returns NULL_ITER_DATA if exhausted/invalid

Usage example (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);

Share :

Related Posts

StrIterFromStr

StrIterFromStr Description Create string iterator from Str object

Read More

StrIterNext

StrIterNext Description Advance to next character in string iterator

Read More

StrIterRemainingLength

StrIterRemainingLength Description Get remaining elements left to read

Read More