XFA Specification
Chapter 23, FormCalc Specification
String Built-in Functions
871
String Built-in Functions
FormCalc
provides a large number of functions to operate on the content of strings, including the ability
to:
retrieve parts of a string
insert parts of a string
delete parts of a string
Many of these functions require a numeric position argument. All strings are indexed starting at character
position one; i.e., character position 1 is the first character of the array. The last character position coincides
with the length of the string.
Any character position less than one refers to the first character string, and any character position greater
than the length of the string refers to the last character of the string.
At()
This function locates the starting character position of string s2 within string s1.
Syntax
At(s1, s2)
Parameters
s1
is the source string.
s2
is the string to search for.
Returns
The character position of the start of s2 within s1 or null if any of its parameters are null.
If string s2 is not in s1, the function returns 0.
If string s2 is empty, the function returns 1.
Examples
At("ABC", "AB")
returns 1.
At("ABCDE", "DE")
returns 4.
At("WXYZ", "YZ")
returns 3.
At("123999456", "999")
Home Index Bookmark Pages
Pages: Home Index All Pages