The goog.string.linkify Namespace

.findFirstEmail(text)

Gets the first email address in text.

text {string}
Plain text.
returns {string}
The first email address, or an empty string if not found.

.findFirstUrl(text)

Gets the first URI in text.

text {string}
Plain text.
returns {string}
The first URL, or an empty string if not found.

.linkifyPlainText(text, opt_attributes)

Takes a string of plain text and linkifies URLs and email addresses. For a URL (unless opt_attributes is specified), the target of the link will be _blank and it will have a rel=nofollow attribute applied to it so that links created by linkify will not be of interest to search engines.

text {string}
Plain text.
opt_attributes {Object.<string, string>=}
Attributes to add to all links created. Default are rel=nofollow and target=blank. To clear those default attributes set rel='' and target='_blank'.
returns {string}
HTML Linkified HTML text.