Class TrimerTags
- Namespace
- SunamoDevCode
- Assembly
- SunamoDevCode.dll
Utility for trimming wrapping HTML tags (b, i, u) from text content.
public static class TrimerTags
- Inheritance
-
TrimerTags
- Inherited Members
Methods
InitTagsWrapping()
Initializes the wrapping tag lists with common formatting tags (i, b, u) in both cases.
public static void InitTagsWrapping()
TrimWrappingTag(string, StringBuilder, StringBuilder)
Trims the outermost wrapping HTML tag from the given HTML string, recording removed tags.
public static string TrimWrappingTag(string html, StringBuilder fromStart, StringBuilder fromEnd)
Parameters
htmlstringHTML text to trim.
fromStartStringBuilderStringBuilder to record the opening tag removed from the start.
fromEndStringBuilderStringBuilder to record the closing tag removed from the end.
Returns
- string
HTML with the outermost wrapping tag removed.