C# Class TextHelper.Highlighter

Datei anzeigen Open project: tylermercier/TextHelper

Public Methods

Method Description
Highlight ( this text, IList phrases, string highlighter ) : string

Highlight(this string, string, string)

Highlight ( this text, string phrase, string highlighter ) : string

Highlights one or more phrases everywhere in text by inserting it into a highlighter string.

Method Details

Highlight() public static method

Highlight(this string, string, string)
public static Highlight ( this text, IList phrases, string highlighter ) : string
text this
phrases IList The list of phrases to highlight
highlighter string
return string

Highlight() public static method

Highlights one or more phrases everywhere in text by inserting it into a highlighter string.
public static Highlight ( this text, string phrase, string highlighter ) : string
text this
phrase string The phrase to highlight
highlighter string A string formatter where {0} will be replaced by the phrase (defaults to <strong class="highlighted">{0}</strong>)
return string