C# 클래스 Loyc.StringBuilderExt

Extension methods that add some functionality of string to StringBuilder.
파일 보기 프로젝트 열기: qwertie/ecsharp

공개 메소드들

메소드 설명
AppendCodePoint ( this s, int c ) : StringBuilder

Appends a unicode code point in the range 0 to 0x10FFFF to StringBuilder in UTF-16.

EndsWith ( this sb, UString what, bool ignoreCase = false ) : bool

Finds out whether the StringBuilder ends with the specified substring.

IndexOf ( this sb, UString searchStr, int startIndex, bool ignoreCase = false ) : int

Gets the index of a substring in a StringBuilder

IndexOf ( this sb, char value, int startIndex ) : int

Gets the index of a character in a StringBuilder

Last ( this str ) : char

Returns the last character of the string

LastIndexOf ( this sb, UString searchStr, int startIndex = int.MaxValue, bool ignoreCase = false ) : int

Gets the index of a substring in a StringBuilder

LastIndexOf ( this sb, char searchChar, int startIndex = int.MaxValue ) : int

Gets the index of a character in a StringBuilder

LastOrDefault ( this str, char @default = '\0' ) : char

Returns the last character of the string, or a default character if the string is empty.

StartsWith ( this sb, UString what, bool ignoreCase = false ) : bool

Finds out whether the StringBuilder starts with the specified substring.

Substring ( this sb, int startIndex, int length ) : string

Extracts a substring from the specified StringBuiler.

SubstringEquals ( StringBuilder sb, int start, UString what, bool ignoreCase = false ) : bool

Checks if the sequences of characters what is equal to sb.Substring(start, what.Length), without actually creating a substring object.

Trim ( this sb ) : StringBuilder

Removes all leading and trailing occurrences of spaces and tabs from the StringBuilder object.

TrimEnd ( this sb ) : StringBuilder

Removes all trailing occurrences of spaces and tabs from the StringBuilder object.

TrimStart ( this sb ) : StringBuilder

Removes all leading occurrences of spaces and tabs from the StringBuilder object.

TryGet ( this s, int index, char defaultValue ) : char
TryGet ( this s, int index ) : char?

비공개 메소드들

메소드 설명
SubstringEqualHelper ( StringBuilder sb, int start, UString what, bool ignoreCase = false ) : bool

메소드 상세

AppendCodePoint() 공개 정적인 메소드

Appends a unicode code point in the range 0 to 0x10FFFF to StringBuilder in UTF-16.
Invalid character c null StringBuildre
public static AppendCodePoint ( this s, int c ) : StringBuilder
s this
c int
리턴 StringBuilder

EndsWith() 공개 정적인 메소드

Finds out whether the StringBuilder ends with the specified substring.
public static EndsWith ( this sb, UString what, bool ignoreCase = false ) : bool
sb this
what UString
ignoreCase bool
리턴 bool

IndexOf() 공개 정적인 메소드

Gets the index of a substring in a StringBuilder
public static IndexOf ( this sb, UString searchStr, int startIndex, bool ignoreCase = false ) : int
sb this
searchStr UString
startIndex int
ignoreCase bool
리턴 int

IndexOf() 공개 정적인 메소드

Gets the index of a character in a StringBuilder
public static IndexOf ( this sb, char value, int startIndex ) : int
sb this
value char
startIndex int
리턴 int

Last() 공개 정적인 메소드

Returns the last character of the string
public static Last ( this str ) : char
str this
리턴 char

LastIndexOf() 공개 정적인 메소드

Gets the index of a substring in a StringBuilder
public static LastIndexOf ( this sb, UString searchStr, int startIndex = int.MaxValue, bool ignoreCase = false ) : int
sb this
searchStr UString
startIndex int
ignoreCase bool
리턴 int

LastIndexOf() 공개 정적인 메소드

Gets the index of a character in a StringBuilder
public static LastIndexOf ( this sb, char searchChar, int startIndex = int.MaxValue ) : int
sb this
searchChar char
startIndex int
리턴 int

LastOrDefault() 공개 정적인 메소드

Returns the last character of the string, or a default character if the string is empty.
public static LastOrDefault ( this str, char @default = '\0' ) : char
str this
@default char
리턴 char

StartsWith() 공개 정적인 메소드

Finds out whether the StringBuilder starts with the specified substring.
public static StartsWith ( this sb, UString what, bool ignoreCase = false ) : bool
sb this
what UString
ignoreCase bool
리턴 bool

Substring() 공개 정적인 메소드

Extracts a substring from the specified StringBuiler.
public static Substring ( this sb, int startIndex, int length ) : string
sb this
startIndex int
length int
리턴 string

SubstringEquals() 공개 정적인 메소드

Checks if the sequences of characters what is equal to sb.Substring(start, what.Length), without actually creating a substring object.
public static SubstringEquals ( StringBuilder sb, int start, UString what, bool ignoreCase = false ) : bool
sb StringBuilder
start int
what UString
ignoreCase bool
리턴 bool

Trim() 공개 정적인 메소드

Removes all leading and trailing occurrences of spaces and tabs from the StringBuilder object.
public static Trim ( this sb ) : StringBuilder
sb this
리턴 StringBuilder

TrimEnd() 공개 정적인 메소드

Removes all trailing occurrences of spaces and tabs from the StringBuilder object.
public static TrimEnd ( this sb ) : StringBuilder
sb this
리턴 StringBuilder

TrimStart() 공개 정적인 메소드

Removes all leading occurrences of spaces and tabs from the StringBuilder object.
public static TrimStart ( this sb ) : StringBuilder
sb this
리턴 StringBuilder

TryGet() 공개 정적인 메소드

public static TryGet ( this s, int index, char defaultValue ) : char
s this
index int
defaultValue char
리턴 char

TryGet() 공개 정적인 메소드

public static TryGet ( this s, int index ) : char?
s this
index int
리턴 char?