method str.splitWhitespace
The words of the text: pieces separated by runs of whitespace, without empty pieces.
Example:
fn main() io {
print("{" one two\tthree\n".splitWhitespace()}")
}Output
["one", "two", "three"]
Splits at runs of whitespace; no empty parts.
Example:
fn main() io {
print("{" a b\tc ".splitWhitespace()}")
}Output
["a", "b", "c"]
pub(api) fn splitWhitespace() -> List<str>Complexity. O(n).
Since. 1.0.0-beta
Returns
List<str>
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/text.oxl:503