Difference between revisions of "AT C()"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | nStartPosition = at_c( | + | nStartPosition = at_c(cDBString, cDBSubString, nOccurrence) |
</code> | </code> | ||
Latest revision as of 07:40, 15 September 2014
Contents
Purpose
Function to search for a substring (double byte character sets)
Syntax
AT_C(<expC1>, <expC2> | <memofield> [,<expN>])
See Also
AT(), CHRTRAN(), CHRTRANC(), LEFT(), LEFTC(), LEN(), LENC(), RAT(), RAT_C(), RIGHT(), RIGHTC(), SET STRESCAPE, STREXTRACT(), STRLEN(), STRTRAN(), STUFF(), STUFFC(), SUBSTR(), SUBSTRC()
Description
AT_C() is the substring search function for double byte character sets. It returns a number signifying the starting position of <expC1> in <expC2> or in the specified memo field. If the substring is not contained within <expC2> or <memofield>, then the function returns the value 0. The leftmost character of a string is in character position 1. The AT_C() function will return the starting position of the Nth occurrence of <expC1> when the optional numeric expression <expN> is specified. The AT_C() function is particularly useful in conjunction with the LEFTC() or SUBSTRC() functions for locating starting points for extracting text from a string.
Example
nStartPosition = at_c(cDBString, cDBSubString, nOccurrence)