Package-level declarations
Functions
Link copied to clipboard
Strips all non-digit ASCII characters from a phone number string. Example: "+1 (800) 555-0199".digitsOnly() → "18005550199"
Link copied to clipboard
Formats a phone number with a custom separator pattern. Example: "0612345678".formatPhonePattern("XX XX XX XX XX") → "06 12 34 56 78" (French style)
Link copied to clipboard
Formats a 10-digit US phone number as "(XXX) XXX-XXXX". Returns the original string if it cannot be parsed. Example: "8005550199".formatUsPhone() → "(800) 555-0199"
Link copied to clipboard
Returns true if the string looks like a valid 10-digit US phone number. Example: "(800) 555-0199".isValidUsPhone() → true