emailaddress.js
No description.

File Location

/goog/format/emailaddress.js

Classes

goog.format.EmailAddress
Formats an email address string for display, and allows for extraction of the individual components of the address.

Public Protected Private

Global Functions

goog.format.EmailAddress.getToken_(strpos) string
Get the next token from a position in an address string.
Arguments:
str : string
the string.
pos : number
the position.
Returns: string  the token.
code »
goog.format.EmailAddress.isEscapedDlQuote_(strpos) boolean
Checks if the character in the current position is an escaped double quote ( \" ).
Arguments:
str : string
the string.
pos : number
the position.
Returns: boolean  true if the char is escaped double quote.
code »
goog.format.EmailAddress.isValidAddrSpec(str) boolean
Checks if the provided string is a valid address spec (local@domain.com).
Arguments:
str : string
The email address to check.
Returns: boolean  Whether the provided string is a valid address spec.
code »
goog.format.EmailAddress.isValidAddress(str) boolean
Checks if the provided string is a valid email address. Supports both simple email addresses (address specs) and addresses that contain display names.
Arguments:
str : string
The email address to check.
Returns: boolean  Whether the provided string is a valid address.
code »
goog.format.EmailAddress.isValidDomainPartSpec(str) boolean
Checks if the provided string is a valid domain part (part after the '@') of an email address.
Arguments:
str : string
The domain part to check.
Returns: boolean  Whether the provided string is a valid domain part.
code »
goog.format.EmailAddress.isValidLocalPartSpec(str) boolean
Checks if the provided string is a valid local part (part before the '@') of an email address.
Arguments:
str : string
The local part to check.
Returns: boolean  Whether the provided string is a valid local part.
code »
goog.format.EmailAddress.parse(addr) !goog.format.EmailAddress
Parses an email address of the form "name" <address> into an email address.
Arguments:
addr : string
The address string.
Returns: !goog.format.EmailAddress  The parsed address.
code »
goog.format.EmailAddress.parseInternal(addrctor) !goog.format.EmailAddress
Parses an email address of the form "name" <address> ("name" is optional) into an email address.
Arguments:
addr : string
The address string.
ctor : function(new: goog.format.EmailAddress, string=,string=)
EmailAddress constructor to instantiate the output address.
Returns: !goog.format.EmailAddress  The parsed address.
code »
goog.format.EmailAddress.parseList(str) !Array.<!goog.format.EmailAddress>
Parses a string containing email addresses of the form "name" <address> into an array of email addresses.
Arguments:
str : string
The address list.
Returns: !Array.<!goog.format.EmailAddress>  The parsed emails.
code »
goog.format.EmailAddress.parseListInternal(strparser) !Array.<!goog.format.EmailAddress>
Parse a string containing email addresses of the form "name" <address> into an array of email addresses.
Arguments:
str : string
The address list.
parser : function(string)
The parser to employ.
Returns: !Array.<!goog.format.EmailAddress>  The parsed emails.
code »

Directory format

File Reference