StrIterLength
Description
Total character length of the region the StrIter covers. Alias- reframe of IterLength in string vocabulary. See IterLength for the full contract.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
ArgParse.c:93:
}
// No digits consumed (cursor at entry) or trailing junk after digits.
if (StrIterRemainingLength(&si) == StrIterLength(&si) || StrIterRemainingLength(&si) != 0)
return false;
if (v > hi)- In
ProcMaps.c:154:
out->path = (Zstr)StrIterDataAt(si, path_start_pos); // may be empty if anonymous
if (line_terminator_pos < StrIterLength(si) && *StrIterDataAt(si, line_terminator_pos) == '\n') {
// intentional bypass: in-place mutation of the iter's backing
// buffer to NUL-terminate the path slice we just exposed via
- In
Parse.c:23:
bool result = true;
result = result && (StrIterIndex(&si) == StrIterLength(&si));
result = result && (MapPairCount(&cfg) == 3);
result = result && KvConfigContains(&cfg, "host");- In
Parse.c:57:
bool result = true;
result = result && (StrIterIndex(&si) == StrIterLength(&si));
result = result && (MapPairCount(&cfg) == 4);
result = result && path && StrCmp(path, "/srv/my app") == 0;- In
Str.Ops.c:230:
StrIter *iter1 = VecPtrAt(&iters, 0);
char buffer1[10] = {0};
MemCopy(buffer1, iter1->data, StrIterLength(iter1));
result = result && (ZstrCompare(buffer1, "Hello") == 0);- In
Str.Ops.c:235:
StrIter *iter2 = VecPtrAt(&iters, 1);
char buffer2[10] = {0};
MemCopy(buffer2, iter2->data, StrIterLength(iter2));
result = result && (ZstrCompare(buffer2, "World") == 0);- In
Str.Ops.c:240:
StrIter *iter3 = VecPtrAt(&iters, 2);
char buffer3[10] = {0};
MemCopy(buffer3, iter3->data, StrIterLength(iter3));
result = result && (ZstrCompare(buffer3, "Test") == 0);
}
Last updated on