Difference between revisions of "ATNEXT()"
Helen.george (Talk | contribs) |
|||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to search a character string for the specified occurrence of a substring | Function to search a character string for the specified occurrence of a substring | ||
− | |||
==Syntax== | ==Syntax== | ||
ATNEXT(<expC1>, <expC2> [, <expN>]) | ATNEXT(<expC1>, <expC2> [, <expN>]) | ||
− | |||
==See Also== | ==See Also== | ||
[[AT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]] | [[AT()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[STR()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]] | ||
− | |||
==Description== | ==Description== | ||
Line 15: | Line 12: | ||
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. | 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== | ==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 | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== | ||
− | + | Lianja Server, Lianja | |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:String Data Functions]] | [[Category:String Data Functions]] |
Latest revision as of 06:24, 4 February 2013
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