words
Splits s into its words, keeping their original casing.
A word ends at any non-alphanumeric character, before an uppercase letter that follows a
lowercase letter or a digit (userName, v2Beta), and before the last capital of an
acronym run (HTMLParser gives HTML, Parser). Use one of the *_case helpers instead if
you want the words lowercased and rejoined.
Import
Section titled “Import”Cargo feature string (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
s | &str | The text to split. |
Returns
Section titled “Returns”Vec<&str> — The words, in order, with no separators or empty entries.
