Method InsertTags
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
sstringThe text which will be processed.
textToFindstringThe text around which tags will be inserted.
beforeTagstringThe tag string which will be inserted before the found substring.
afterTagstringThe tag string which will be inserted after the found substring.
comparisonStringComparisonStringComparison used to specify how text will be compared.
Returns
- string
Changed text with tags around found substring.