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
s
stringThe text which will be processed.
textToFind
stringThe text around which tags will be inserted.
beforeTag
stringThe tag string which will be inserted before the found substring.
afterTag
stringThe tag string which will be inserted after the found substring.
comparison
StringComparisonStringComparison used to specify how text will be compared.
Returns
- string
Changed text with tags around found substring.