{ "type": "class", | |
"qname": "mx.formatters.SwitchSymbolFormatter", | |
"baseClassname": "" | |
, | |
"description": "The SwitchSymbolFormatter class is a utility class that you can use when creating custom formatters. This class performs a substitution by replacing placeholder characters in one String with numbers from a second String. <p>For example, you specify the following information to the SwitchSymbolFormatter class:</p> <p>Format String: "The SocialSecurity number is: ###-##-####"</p> <p>Input String: "123456789"</p> <p>The SwitchSymbolFormatter class parses the format String and replaces each placeholder character, by default the number character (#), with a number from the input String in the order in which the numbers are specified in the input String. You can define a different placeholder symbol by passing it to the constructor when you instantiate a SwitchSymbolFormatter object.</p> <p>The output String created by the SwitchSymbolFormatter class from these two Strings is the following:</p> <p>"The SocialSecurity number is: 123-45-6789"</p> <p>The pattern can contain any characters as long as they are constant for all values of the numeric portion of the String. However, the value for formatting must be numeric.</p> <p>The number of digits supplied in the source value must match the number of digits defined in the pattern String. This is the responsibility of the script calling the SwitchSymbolFormatter object.</p>", | |
"tags": [ | |
{ "tagName": "includeExample", | |
"values": ["examples/SwitchSymbolFormatterExample.mxml"]}, | |
{ "tagName": "see", | |
"values": ["mx.formatters.PhoneFormatter"]}, | |
{ "tagName": "access", | |
"values": ["private"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"members": [ | |
{ "type": "method", | |
"qname": "mx.formatters.SwitchSymbolFormatter", | |
"namespace": "", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Constructor.", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["numberSymbol Character to use as the pattern character."]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "", | |
"params": [{ "name": "numberSymbol", "type": "String"}]} | |
, | |
{ "type": "method", | |
"qname": "formatValue", | |
"namespace": "public", | |
"bindable": [], | |
"details": [], | |
"deprecated": {}, | |
"description": "Creates a new String by formatting the source String using the format pattern. (alpha characters are allowed if needed).", | |
"tags": [ | |
{ "tagName": "param", | |
"values": ["format String that defines the user-requested pattern including.", "source Valid number sequence"]}, | |
{ "tagName": "playerversion", | |
"values": ["Flash 9", "AIR 1.1"]}, | |
{ "tagName": "productversion", | |
"values": ["Royale 0.9.3"]}, | |
{ "tagName": "return", | |
"values": ["Formatted String."]}, | |
{ "tagName": "langversion", | |
"values": ["3.0"]} ], | |
"return": "String", | |
"params": [{ "name": "format", "type": "String"}, | |
{ "name": "source", "type": "Object"}]} | |
] | |
} |