Difference between revisions of "ATNEXT()"
Yvonne.milne (Talk | contribs) m (1 revision) |
m (Text replace - "Recital" to "Lianja") |
||
Line 19: | Line 19: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | ? atnext("is", "The fact is that | + | ? atnext("is", "The fact is that Lianja is good", 2) |
26 | 26 | ||
cString1 = "is" | cString1 = "is" | ||
− | cString2 = "The fact is that | + | cString2 = "The fact is that Lianja is good" |
? atnext(cString1, cString2, 2) | ? atnext(cString1, cString2, 2) | ||
26 | 26 | ||
Line 29: | Line 29: | ||
==Products== | ==Products== | ||
− | + | Lianja Server, Lianja | |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:String Data]] | [[Category:String Data]] | ||
[[Category:String Data Functions]] | [[Category:String Data Functions]] |
Revision as of 12:27, 7 December 2012
Purpose
Function to search a character string for the specified occurrence of a substring
Syntax
ATNEXT(<expC1>, <expC2> [, <expN>])
See Also
AT(), INLIST(), LEFT(), OCCURS(), RAT(), RIGHT(), STR(), STREXTRACT(), STRTRAN(), STUFF(), SUBSTR()
Description
ATNEXT() is a substring search function which returns a number signifying the start position of a specified occurrence of <expC1> in <expC2>. The <expN> specifies the occurrence of <expC1> in <expC2>. The ATNEXT() function returns the value 0 if the specified occurrence does not exist. If <expN> is not specified, ATNEXT() checks for the first occurrence of <expC1>.
The leftmost character of a string is in character position 1. The ATNEXT() function is particularly useful in conjunction with the LEFT() or SUBSTR() functions for locating starting points for extracting text from a string.
Example
? atnext("is", "The fact is that Lianja is good", 2) 26 cString1 = "is" cString2 = "The fact is that Lianja is good" ? atnext(cString1, cString2, 2) 26
Products
Lianja Server, Lianja