C# 클래스 Nancy.Blog.StringHtmlExtensions

파일 보기 프로젝트 열기: NancyFx/Nancy.Blog

공개 메소드들

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

Strips all HTML tags from a 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
리턴 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
maxCharacters int
리턴 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
maxCharacters int
trailingText string
리턴 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