Expand description
Efficiently split lines by whitespace, while handling the backslash escape sequences in Rust-like string format.
For example, if you had a string like:
One\ two three\ fourNaïve splitting on whitespace would produce four outputs:
One\twothree\four
This crate will instead produce two strings:
One twothree four
This crate also handles special escape sequences like “\n”, which represents a newline. Specifically, the escape sequences are:
\a\b\t\n\v\f\r\\
If the backslash character is found, but the successive character is not special, then the backslash is disregarded and the successive character is included verbatim.
Functions§
- escape
- Converts text with all the special characters escape with a backslash
- split
- Produce all the words as a vector
- split_
one - Split some text by unescaped whitespace.
- split_
one_ bytes - Splits once