Character view operations¶
No import is needed.
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
byte_size¶
String payloads use UTF-16; character arrays store full 32-bit values.
byte_at¶
Returns the byte at the zero-based byte index; an invalid index panics.
to_string¶
Returns a text representation of this value.
hash_code¶
Matches string hashing for UTF-16 elements without allocating a string.
equals¶
Returns whether this value equals other.
compare¶
Returns a negative number, zero, or a positive number for less than, equal to, or greater than other.
compare¶
Returns a negative number, zero, or a positive number for less than, equal to, or greater than other.
starts_with¶
Returns whether this text begins with prefix.
ends_with¶
Returns whether this text ends with suffix.
trim¶
Returns a view without leading or trailing whitespace.
trim_start¶
Returns a view without leading whitespace.
trim_end¶
Returns a view without trailing whitespace.
parse_int¶
Parses a decimal integer, returning ParseError for invalid or out-of-range input.
parse_double¶
Parses a floating-point number, returning ParseError for invalid input.
split_iter¶
Iterates over segments separated by sep without copying their contents.
split_iter¶
Iterates over segments separated by sep without copying their contents.
lines¶
Iterates over the lines without copying their contents.