HtmlExtensions.Emphasize Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Emphasize(string, IList)

Emphasizes (wraps in <em></em>) all matching search terms in the input text.

public static string Emphasize(this string input, IList<string> terms)

Parameters

input
string

The text to examine.

terms
System.Collections.Generic.IList

List of words to mark in the text.

Returns

string

A string with all matching search termns highlighted.