Table of Contents

Method InsertTags

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

InsertTags(string, string, string, string, StringComparison)

Inserts tags before and after substring.

public static string InsertTags(string s, string textToFind, string beforeTag, string afterTag, StringComparison comparison = StringComparison.CurrentCultureIgnoreCase)

Parameters

s string

The text which will be processed.

textToFind string

The text around which tags will be inserted.

beforeTag string

The tag string which will be inserted before the found substring.

afterTag string

The tag string which will be inserted after the found substring.

comparison StringComparison

StringComparison used to specify how text will be compared.

Returns

string

Changed text with tags around found substring.