XFA Specification
Chapter 23, FormCalc Specification
String Built-in Functions
887
Str()
This function converts a number to a character string.
Syntax
Str(n1 [, n2 [, n3]])
Parameters
n1
is the number to convert.
n2
is the maximal width of the string; if omitted, a value of 10 is used as the default width.
n3
is the precision — the number of digits to appear after the decimal point; if omitted, or negative, 0
is used as the default precision.
Returns
The formatted number or null if any of its mandatory parameters are null.
The number is formatted to the specified width and rounded to the specified precision; the number may
have been zero-padded on the left of the decimal to the specified precision. The decimal radix character
used is the dot (.) character; it is always independent of the
prevailing locale
.
If the resulting string is longer than the maximal width of the string, as defined by n2, then the function
returns a string of '*' (asterisk) characters of the specified width.
Examples
Str(2.456) returns "
2".
Str(4.532, 6, 4) returns "4.5320".
Str(31.2345, 4, 2) returns "****".
See Also
Format()
.
Home Index Bookmark Pages
Pages: Home Index All Pages