<-- Previous || Up || Next -->

Telephone Number Letters To Digits Function
Codes Ciphers Class

Public Function TelephoneNumberLettersToDigits( _
    ByVal vTelephoneNumber As Variant _
    ) As Variant

Converts a telephone number containing letters and numbers to the equivalent number-only string.

Summary: The algorithm uses a straight substitution to replace most alphabetic characters with the telephone dialing keypad number that they represent.
Examples:
    TelephoneNumberLettersToDigits("1-800-554-UNIX") = "1-800-554-8649"
    TelephoneNumberLettersToDigits("1-800-QUIT-NOW") = "1-800-Q848-669"
See also:
    StringReplacements Class
       TranslateString Function
Note: There is no translation for the letters "Q" and "Z"--they remain unchanged in the result string.
vValue: The string which represents a telephone number and is to have its alphabetic characters replaced with the appropriate number. Function returns Null if vValue is Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.