Product Site

5.1.7.99. word

Returns the nth whitespace-delimited word in the receiving string or the null string if the receiving string has fewer than n words. The n must be a positive whole number. This method is exactly equivalent to subWord(n, 1).
Example 5.134. String class — word method
"Now is the time"~word(3)    -->    "the"
"Now is the time"~word(5)    -->    ""