Sane C++ Libraries: SC::StringIteratorASCII Struct Reference (original) (raw)
Public Member Functions
constexpr bool
advanceUntilMatches (CodePoint c)
Public Member Functions inherited from SC::StringIterator< StringIteratorASCII >
constexpr void
setToStart ()
Rewind current position to start of iterator range.
constexpr void
setToEnd ()
Set current position to end of iterator range.
constexpr bool
isAtEnd () const
Check if current position is at end of iterator range.
constexpr bool
isAtStart () const
Check if current position is at start of iterator range.
constexpr bool
advanceUntilMatches (CodePoint c)
Advances position towards end until it matches CodePoint c or position == end
bool
reverseAdvanceUntilMatches (CodePoint c)
Moves position towards start until CodePoint c is found or position == end
bool
advanceAfterFinding (StringIterator< OtherIterator > other)
Advances position towards end until a matching range of character equal to other[it, end) is found.
bool
advanceAfterFinding (StringIterator other)
bool
advanceBeforeFinding (StringIterator< OtherIterator > other)
Advances position towards end until a matching range of character equal to other[it, end) is found.
bool
advanceBeforeFinding (StringIterator other)
bool
advanceByLengthOf (StringIterator other)
Advances position by the same number of code points as other.
bool
advanceUntilMatchesAny (Span< const CodePoint > items, CodePoint &matched)
Advances position until any CodePoint in the given Span is found.
bool
reverseAdvanceUntilMatchesAny (Span< const CodePoint > items, CodePoint &matched)
Moves position towards start until any CodePoint in the given Span is found.
bool
advanceUntilDifferentFrom (CodePoint c, CodePoint *optionalReadChar=nullptr)
Advances position until a code point different from c is found or end is reached.
constexpr bool
advanceIfMatches (CodePoint c)
Advance position only if next code point matches c.
bool
advanceBackwardIfMatches (CodePoint c)
Move position by one code point towards start if previous code point matches c
bool
advanceIfMatchesAny (Span< const CodePoint > items)
Advance position only if any of the code points in given Span is matched.
bool
advanceIfMatchesRange (CodePoint first, CodePoint last)
Advance position if any code point in the range [first, last] is matched.
bool
match (CodePoint c)
Check if code unit at current position matches CodePoint c
constexpr bool
advanceRead (CodePoint &c)
Decode code unit at current position and advance.
bool
read (CodePoint &c)
Read code unit at current position.
bool
advanceBackwardRead (CodePoint &c)
Move to previous position and read code unit.
constexpr bool
stepForward ()
Move position to next code point.
constexpr bool
stepBackward ()
Move position to previous code point.
constexpr bool
advanceCodePoints (size_t numCodePoints)
Move position forward (towards end) by variable number of code points.
bool
reverseAdvanceCodePoints (size_t numCodePoints)
Move position backwards (towards start) by variable number of code pints.
constexpr bool
isFollowedBy (CodePoint c)
Check if next code point is c
constexpr bool
isPrecededBy (CodePoint c)
Check if previous code point is c
constexpr StringIterator
sliceFromStartUntil (StringIterator otherPoint) const
Returns another StringIterator range, starting from start to otherPoint position.
constexpr ssize_t
bytesDistanceFrom (StringIterator other) const
Get distance in bytes from current position to another StringIterator current position.
bool
endsWithAnyOf (Span< const CodePoint > codePoints) const
Check if this Iterator ends with any code point in the given span.
bool
startsWithAnyOf (Span< const CodePoint > codePoints) const
Check if this Iterator starts with any code point in the given span.
bool
endsWith (IteratorType other) const
Check if this Iterator at its end matches entirely another Iterator's range.
bool
startsWith (IteratorType other) const
Check if this Iterator at its start matches entirely another Iterator's range.
A string iterator for ASCII strings.