C# 클래스 FP.Text.Strings

Provides a set of static (Shared in Visual Basic) methods for strings.
The source of each method includes the Haskell version as a comment at the end. Some methods are not safe to use with mutable collections. These cases are mentioned in the documentation for the method. The order of arguments has generally been inverted compared to the Haskell versions to facilitate method chaining. See also the Remarks for Enumerable.
파일 보기 프로젝트 열기: lukesandberg/PexFaultLocalization

공개 메소드들

메소드 설명
AsString ( this charSequence ) : string

Converts a sequence of chars to a string. This should be called ToString, but this is impossible for the obvious reason.

Clear ( this sb ) : void

Clears the specified StringBuilder. This is equivalent to calling sb.Count = 0.

IsNullOrEmpty ( this s ) : bool

Determines whether the string is null or empty. This is merely string.IsNullOrEmpty(s) as an extension method.

Lines ( this charSequence ) : IEnumerable

Breaks the specified char sequence into a sequence of strings at newline characters. The resulting strings do not contain newlines.

ReverseIterator ( this s ) : IEnumerable

Enumerates the specified string in the reverse order.

UnLines ( this lines ) : IEnumerable

An inverse to Lines. Joins lines, after appending a terminating newline to each.

UnLinesAsString ( this lines ) : string

Equivalent to UnLines().AsString(), but more efficient.

UnLinesCS ( this lines ) : IEnumerable

An inverse to Lines. It joins lines, after appending a terminating newline to each.

UnWords ( this words ) : IEnumerable

An inverse to Words. It joins words, separating them by a single space.

UnWordsAsString ( this words ) : string

Equivalent to UnWords().AsString(), but more efficient.

UnWordsCS ( this words ) : IEnumerable

An inverse to Words. It joins words, separating them by a single space.

Words ( this charSequence ) : IEnumerable

Breaks the specified char sequence into a sequence of words delimited by whitespace. The resulting strings do not contain whitespace.

메소드 상세

AsString() 공개 정적인 메소드

Converts a sequence of chars to a string. This should be called ToString, but this is impossible for the obvious reason.
public static AsString ( this charSequence ) : string
charSequence this The char sequence.
리턴 string

Clear() 공개 정적인 메소드

Clears the specified StringBuilder. This is equivalent to calling sb.Count = 0.
public static Clear ( this sb ) : void
sb this The .
리턴 void

IsNullOrEmpty() 공개 정적인 메소드

Determines whether the string is null or empty. This is merely string.IsNullOrEmpty(s) as an extension method.
public static IsNullOrEmpty ( this s ) : bool
s this
리턴 bool

Lines() 공개 정적인 메소드

Breaks the specified char sequence into a sequence of strings at newline characters. The resulting strings do not contain newlines.
public static Lines ( this charSequence ) : IEnumerable
charSequence this The char sequence.
리턴 IEnumerable

ReverseIterator() 공개 정적인 메소드

Enumerates the specified string in the reverse order.
public static ReverseIterator ( this s ) : IEnumerable
s this
리턴 IEnumerable

UnLines() 공개 정적인 메소드

An inverse to Lines. Joins lines, after appending a terminating newline to each.
public static UnLines ( this lines ) : IEnumerable
lines this A sequence of strings.
리턴 IEnumerable

UnLinesAsString() 공개 정적인 메소드

Equivalent to UnLines().AsString(), but more efficient.
public static UnLinesAsString ( this lines ) : string
lines this A sequence of strings.
리턴 string

UnLinesCS() 공개 정적인 메소드

An inverse to Lines. It joins lines, after appending a terminating newline to each.
public static UnLinesCS ( this lines ) : IEnumerable
lines this A sequence of sequences of chars.
리턴 IEnumerable

UnWords() 공개 정적인 메소드

An inverse to Words. It joins words, separating them by a single space.
public static UnWords ( this words ) : IEnumerable
words this A sequence of strings.
리턴 IEnumerable

UnWordsAsString() 공개 정적인 메소드

Equivalent to UnWords().AsString(), but more efficient.
public static UnWordsAsString ( this words ) : string
words this A sequence of strings.
리턴 string

UnWordsCS() 공개 정적인 메소드

An inverse to Words. It joins words, separating them by a single space.
public static UnWordsCS ( this words ) : IEnumerable
words this A sequence of sequences of chars.
리턴 IEnumerable

Words() 공개 정적인 메소드

Breaks the specified char sequence into a sequence of words delimited by whitespace. The resulting strings do not contain whitespace.
public static Words ( this charSequence ) : IEnumerable
charSequence this The char sequence.
리턴 IEnumerable