StringTools[Words] - split a string into words
StringTools[WordCount] - count the number of words in a string
|
Calling Sequence
|
|
Words( s )
WordCount( s )
|
|
Description
|
|
•
|
The Words(s) command splits a string into its constituent words. A list of the words in the input string s, in order, is returned. The non-word characters in the string are elided from the output.
|
•
|
The WordCount(s) command counts the number of words in a given string s.
|
•
|
A word is defined to be a maximal contiguous sequence of alphanumeric characters or the apostrophe character ('). Words are delimited by non-word characters.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
|
|
Download Help Document
Was this information helpful?