WordNum( )

Microsoft Visual FoxPro Foxtools

WordNum( )

Returns the specified word in a string.

Syntax

WordNum(cString, nIndex[, cDelimiter])

cString

Specifies the string containing the word to be returned.

nIndex

Specifies the index position of the word to be returned. For example, if nIndex is 3, WordNum( ) returns the third word (if cString contains three or more words).

cDelimiter

Specifies the character used to delimit words in cString. The default delimiters are space, tab, and carriage return.

Return Type

Character

Remarks

If cString contains fewer words than the number specified with cIndex, WordNum( ) returns an empty string.