GetWordNum Function (String, Long, String) | |
Returns a specified word from a string.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION GetWordNum(
cString AS STRING,
nIndex AS LONG,
cDelimiters AS STRING
) AS STRING
public static string GetWordNum(
string cString,
int nIndex,
string cDelimiters
)
Request Example
View SourceParameters
- 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).
- cDelimiters
- Type: String
Optional. Specifies one or more optional characters used to separate words in cString. The default delimiters are space, tab, carriage return, and line feed. Note that GetWordNum( ) uses each of the characters in cDelimiters as individual delimiters, not the entire string as a single delimiter.
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