C# 클래스 TextHelper.Excerptor

파일 보기 프로젝트 열기: tylermercier/TextHelper

공개 메소드들

메소드 설명
Excerpt ( this text, string phrase, int radius = 100, string omission = "..." ) : string

Extracts an excerpt from text that matches the first instance of phrase. The resulting string will be stripped in any case.

비공개 메소드들

메소드 설명
GetExcerptWithOmission ( string text, string phrase, int phraseIndex, int radius, string omission ) : string

메소드 상세

Excerpt() 공개 정적인 메소드

Extracts an excerpt from text that matches the first instance of phrase. The resulting string will be stripped in any case.
public static Excerpt ( this text, string phrase, int radius = 100, string omission = "..." ) : string
text this
phrase string The excerpt to find
radius int Expands the excerpt on each side of the first occurrence of phrase by the number of characters defined (default 100).
omission string If the excerpt radius overflows the beginning or end of the text, then the omission option (which defaults to “…”) will be prepended/appended accordingly.
리턴 string