Xbasic
MASK Function
Syntax
Formatted_String as C = MASK(C string,C template)
Arguments
- stringCharacter
A string containing the text to format.
- templateCharacter
A character string containing formatting and space characters. Any non-space character may be used for formatting.
Returns
- Formatted_StringCharacter
Returns a formatted string.
Description
Replace spaces in template with characters of string.
Discussion
MASK() inserts characters from an unformatted string into a template, to replace all of the spaces in the template and return the newly formatted string. Non-blank characters in template are included in the output string. To include a space in the string, use the pipe character ( | ) in the template.
Example
? mask("6175551212", "( )| - ") = "(617) 555-1212"
See Also