Util Object
The Util Object is a static JavaScript object that defines a number of utility methods and
convenience functions for string and date formatting.
Util Object Methods
printf
Parameters: cFormat
Returns: cResult
This method will format one or more values as a string according to a format string. This is
similar to the C function of the same name.
printx
Parameters: cMask, …
Returns: cResult
This method formats a source string according to a masking string. Valid masking values are as
follows:
Value
?
X
A
9
*
\
>
<
=
Effect
Copy next character.
Copy next alphanumeric character, skipping any others.
Copy next alpha character, skipping any others.
Copy next numeric character, skipping any others.
Copy the rest of the source string from this point on.
Escape character.
Uppercase translation until further notice.
Lowercase translation until further notice.
Preserve case until further notice (default).
To format a string as a U.S. telephone number, for example, use the following script:
var v = "aaa14159697489zzz";
v = util.printx("9 (999) 999-9999", v);
console.println(v);
Acrobat Forms - JavaScript Object Specification
53
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.