Record CharsIterpub

Source
Implements: Foldable · Iterator
:record(pub) CharsIter
  .str Str
  .pos (Int ..)
Description

Lazy character iterator over a Str. Tracks the UTF-8 byte position of the next codepoint to yield.

Fields

.str Str
.pos Int(..)

Trait Implementations

impl Foldable for CharsIter

.all ( CharsIter [elem Bool ] Bool )

.any ( CharsIter [elem Bool ] Bool )

.chunks-n ( CharsIter (Int ..) (Vec (Vec elem)) )

.count ( CharsIter (Int ..) )

.count-where ( CharsIter [elem Bool ] (Int ..) )

.enumerate ( CharsIter (Pair (Int ..) (Vec (Pair (Int ..) elem))) )

.filter-map ( CharsIter [elem (Option b) ] (Vec b) )

.find ( CharsIter [elem Bool ] (Option elem) )

.find-map ( CharsIter [elem (Option b) ] (Option b) )

.first ( CharsIter (Option elem) )

.flat-map ( CharsIter [elem (Vec b n) ] (Vec b) )

.flatten ( CharsIter (Vec elem) )

.fold ( CharsIter acc [acc Codepoint acc ] acc )

.for-each ( CharsIter [Codepoint ] )

.intersperse ( CharsIter elem (Vec elem) )

.is-partitioned ( CharsIter [elem Bool ] Bool )

.last ( CharsIter (Option elem) )

.map-while ( CharsIter [elem (Option b) ] (Vec b) )

.max-by ( CharsIter [elem elem Ordering ] (Option elem) )

.max-by-key ( CharsIter [elem key ] (Option elem) )

.min-by ( CharsIter [elem elem Ordering ] (Option elem) )

.min-by-key ( CharsIter [elem key ] (Option elem) )

.partition ( CharsIter [elem Bool ] (Vec elem la) (Vec elem lb) )

.position ( CharsIter [elem Bool ] (Option (Int ..)) )

.reduce ( CharsIter [elem elem elem ] (Option elem) )

.rposition ( CharsIter [elem Bool ] (Option (Int ..)) )

.scan ( CharsIter state [state elem state (Option result) ] (Vec result) )

.skip ( CharsIter (Int ..) (Vec elem) )

.skip-while ( CharsIter [elem Bool ] (Vec elem) )

.step-by ( CharsIter (Int ..) (Vec elem) )

.take ( CharsIter (Int ..) (Vec elem) )

.take-while ( CharsIter [elem Bool ] (Vec elem) )

.try-fold ( CharsIter acc [acc elem (Result acc err) ] (Result acc err) )

.try-for-each ( CharsIter [elem (Result Unit err) ] (Result Unit err) )

.try-reduce ( CharsIter [elem elem (Result elem err) ] (Result (Option elem) err) )

.unzip ( CharsIter (Pair (Vec a) (Vec b)) )

impl Iterator for CharsIter | Codepoint

.next ( CharsIter CharsIter (Option Codepoint) )