Table of Contents

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

html string

HTML text to trim.

fromStart StringBuilder

StringBuilder to record the opening tag removed from the start.

fromEnd StringBuilder

StringBuilder to record the closing tag removed from the end.

Returns

string

HTML with the outermost wrapping tag removed.