public class TelephoneNumberFormatter extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
format(String number,
String[] maskArray)
Formats telephone number.
|
static String |
format(String number,
String[] maskArray,
boolean truncate,
boolean rightToLeft)
Formats telephone number.
|
static String |
format(String number,
String[] maskArray,
Boolean truncate,
Boolean rightToLeft)
Formats telephone number.
|
static String |
normalize(String number)
Normalizes number removing formatting characters
|
public static String format(String number, String[] maskArray)
number - telephone number to be formattedmaskArray - array of formatting maskspublic static String format(String number, String[] maskArray, Boolean truncate, Boolean rightToLeft)
number - telephone number to be formattedmaskArray - array of formatting maskstruncate - true if number needs to be truncatedrightToLeft - true if the direction of formatting is Right to Leftpublic static String format(String number, String[] maskArray, boolean truncate, boolean rightToLeft)
number - telephone number to be formattedmaskArray - array of formatting maskstruncate - true if number needs to be truncatedrightToLeft - true if the direction of formatting is Right to LeftCopyright © 2003, 2023, Oracle and/or its affiliates.