JavaScript

$u.s.word Function

Syntax

$u.s.word(str as string, wordNumber as number [, separator as string])

Arguments

strstring

String that contains the word.

wordNumbernumber

A number indicating which word to extract from the string.

separatorstring

(Optional) Default value is a space. Specify the word separator that marks word boundaries.

Description

Fetch a given word from a string, based on a separator (the default separator is a space).

Example

var str = 'The boy wore a yellow shirt';
str = $u.s.word(str,2,'wore');
/* result is: ' a yellow shirt'*/