Xbasic
LEADING Function
Syntax
Separation_Characters as C = LEADING(C strings,N word_number)
Arguments
- strings
A string expression containing words separated by repeating characters.
- word_number
Specifies the word in the Input_String to examine. Numeric
Description
Returns the non-word characters preceding the specified word.
Discussion
LEADING() returns the characters that separate the word_number word in strings from the previous word.
Example
leading("now.is the,time", 2) -> "." leading("now.is the,time", 3) -> " " leading("now.is the,time", 4) -> "," leading("now...is,,,,the:::time", 4) -> ":::" leading("now...is,,,,the:::time", 3) -> ",,,,"
See Also