ExcludeNthWord

STD.Str.ExcludeNthWord( text, n )

STD.Uni.ExcludeNthWord( text, n, localename )

textA string containing words separated by whitespace.
nA integer containing the ordinal position of the word to remove.
localenameOptional. The locale to use for the break semantics. Defaults to ''
Return: ExcludeNthWord returns a STRING or UNICODE value, as appropriate.

The ExcludeNthWord function returns the text string with the nth word removed.

Words are separated by one or more whitespace characters. For the Unicode version, words are marked by the Unicode break semantics.

Trailing whitespaces are always removed with the word. Leading whitespaces are only removed with the word if the nth word is the first word.

Returns a blank string if there are no words in the source string. Returns the source string if the number of words in the string is less than the n parameter's assigned value.

Example:

A := STD.Str.ExcludeNthWord('The quick brown fox',2);
 //A contains 'The brown fox'