Click or drag to resize

GetWordNum Function (String, Long)

X#
Returns a specified word from a string.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION GetWordNum(
	cString AS STRING,
	nIndex AS LONG
) AS STRING
Request Example View Source

Parameters

cString
Type: String
Specifies the string to be evaluated
nIndex
Type: Long
Specifies the index position of the word to be returned. For example, if nIndex is 3, GetWordNum( ) returns the third word (if cString contains three or more words).

Return Value

Type: String
Character
Remarks
Returns the word at the position specified by nIndex in the target string, cString. If cString contains fewer than nIndex words, GetWordNum( ) returns an empty string.
See Also