![]() |
![]() |
$str.wordReturns the nth word in a string |
|
Usage | |
|
|
Description | |
Returns the nth word inside the <string> (with n starting from 0!) A word is a substring not containing spaces (ASCII chars 32, carriage returns, tabs etc...). If the string contains less than n+1 words then an empty string is returned. This function is faster than a call to $split() and array indexing if you need a single word to be extracted from a complex string. If you need to manage more than one word from the string then the $split() method is more efficient. This function is a special case of $str.token() and it runs a bit faster. |
|
Syntax Specification | |
|
|
Examples | |
|
|
See also | |
$str.token |