Words¶
Constructors¶
create¶
Returns¶
- Words val^
Public Functions¶
count¶
Number of UAX #29 word segments in s. A "word segment" here is
any boundary-delimited run — letters, numerics, and punctuation
all count, since UAX #29 defines boundaries rather than
"wordness". Use the test Words.iter and filter to letters/
numerics yourself if you want only words-as-text.
Parameters¶
- s: String box
Returns¶
- (USize val | InvalidUtf8 val)
ranges¶
Iterator over byte ranges [start, end_exclusive) of each word
segment. Zero per-yield allocation.
Parameters¶
- s: String box
Returns¶
- (Iterator[(USize val , USize val)] ref | InvalidUtf8 val)
iter¶
Iterator yielding each word segment as a String val slice
(zero byte-copy). Takes String val because the yielded slices
share the same val buffer.
Parameters¶
- s: String val
Returns¶
- (Iterator[String val] ref | InvalidUtf8 val)
eq¶
Parameters¶
- that: Words val
Returns¶
- Bool val
ne¶
Parameters¶
- that: Words val
Returns¶
- Bool val