C# 클래스 DotNetMashup.Web.Extensions.BclExtensions

파일 보기 프로젝트 열기: TerribleDev/DotNetMashup

공개 메소드들

메소드 설명
StripHtml ( this html ) : string

Strips all HTML tags from a string

TrimAll ( this input ) : string
Truncate ( this text, int maxCharacters ) : string

Truncates text to a number of characters

Truncate ( this text, int maxCharacters, string trailingText ) : string

Truncates text to a number of characters and adds trailing text, i.e. elipses, to the end

TruncateHtml ( this html, int maxCharacters ) : string

Truncates a string containing HTML to a number of text characters, keeping whole words. The result contains HTML and any tags left open are closed.

TruncateHtml ( this html, int maxCharacters, string trailingText ) : string

Truncates a string containing HTML to a number of text characters, keeping whole words. The result contains HTML and any tags left open are closed.

TruncateWords ( this text, int maxCharacters ) : string

Truncates text and discars any partial words left at the end

TruncateWords ( this text, int maxCharacters, string trailingText ) : string

Truncates text and discars any partial words left at the end

메소드 상세

StripHtml() 공개 정적인 메소드

Strips all HTML tags from a string
public static StripHtml ( this html ) : string
html this todo: describe html parameter on StripHtml
리턴 string

TrimAll() 공개 정적인 메소드

public static TrimAll ( this input ) : string
input this
리턴 string

Truncate() 공개 정적인 메소드

Truncates text to a number of characters
public static Truncate ( this text, int maxCharacters ) : string
text this
maxCharacters int
리턴 string

Truncate() 공개 정적인 메소드

Truncates text to a number of characters and adds trailing text, i.e. elipses, to the end
public static Truncate ( this text, int maxCharacters, string trailingText ) : string
text this
maxCharacters int
trailingText string
리턴 string

TruncateHtml() 공개 정적인 메소드

Truncates a string containing HTML to a number of text characters, keeping whole words. The result contains HTML and any tags left open are closed.
public static TruncateHtml ( this html, int maxCharacters ) : string
html this todo: describe html parameter on TruncateHtml
maxCharacters int todo: describe maxCharacters parameter on TruncateHtml
리턴 string

TruncateHtml() 공개 정적인 메소드

Truncates a string containing HTML to a number of text characters, keeping whole words. The result contains HTML and any tags left open are closed.
public static TruncateHtml ( this html, int maxCharacters, string trailingText ) : string
html this todo: describe html parameter on TruncateHtml
maxCharacters int todo: describe maxCharacters parameter on TruncateHtml
trailingText string todo: describe trailingText parameter on TruncateHtml
리턴 string

TruncateWords() 공개 정적인 메소드

Truncates text and discars any partial words left at the end
public static TruncateWords ( this text, int maxCharacters ) : string
text this
maxCharacters int
리턴 string

TruncateWords() 공개 정적인 메소드

Truncates text and discars any partial words left at the end
public static TruncateWords ( this text, int maxCharacters, string trailingText ) : string
text this
maxCharacters int
trailingText string
리턴 string