phone-numbers-0.0.3: Haskell bindings to the libphonenumber library

Safe HaskellNone
LanguageHaskell98

Data.PhoneNumber

Contents

Synopsis

Types

data PhoneNumber Source

A data type representation of a phone number, you can build one of these with copyPhoneNumberRef.

data PhoneNumberParseError Source

There was a problem parting your phone number. For now, if you want to know what the Int here means, you'll need to look at the ErrorType enum in the underlying library.

Parsing

parsePhoneNumber Source

Arguments

:: ByteString

The phone number to parse

-> ByteString

A two letter country code for the default region to be assumed

-> Either PhoneNumberParseError PhoneNumber 

Try to parse a phone number

Utility

convertAlphaCharacters :: ByteString -> ByteString Source

Convert any alpha characters in a phone number to their equivalent keypad numbers.