XFA Specification
Chapter 23, FormCalc Specification
String Built-in Functions
889
Substr()
This function extracts a portion of a given string.
Syntax
Substr(s1, n1, n2)
Parameters
s1
is the string to be evaluated.
n1
is the character position in string s1 to start extracting.
If n1 is less than one, the first character position is assumed.
If n1 is greater than then length of s1, the last character position is assumed
n2
is the number of characters to extract.
If n2 is less than or equal to 0, 0 characters are assumed.
Returns
The sub string or null if any of its parameters are null.
If n1 + n2 is greater than the length of s1 then the function returns the sub string starting a position n1 to
the end of s1 .
Examples
Substr("ABCDEFG", 3, 4)
returns "CDEF".
Substr("abcdefghi", 5, 3)
returns "efg".
Home Index Bookmark Pages
Pages: Home Index All Pages