C# 클래스 Organic.Extensions

파일 보기 프로젝트 열기: SirCmpwn/organic

공개 메소드들

메소드 설명
ContainsKey ( this value, string key ) : bool
GetValue ( this value, string key ) : ushort
SafeContains ( this value, char needle ) : bool
SafeIndexOf ( this value, char needle ) : int
SafeIndexOf ( this value, char needle, int startIndex ) : int
SafeIndexOfParenthesis ( this value, char needle ) : int
SafeIndexOfParenthesis ( this value, char needle, int startIndex ) : int
SafeSplit ( this value ) : string[]

Works the same as String.Split, but will not split if the requested characters are within a character or string literal.

TrimComments ( this value ) : string

Given a string, such as "SET A, B ; test", it removes all comments from that string.

TrimExcessWhitespace ( this value ) : string

Removes unneccissary whitespace from a line of code.

Unescape ( this value ) : string

Given a string with escaped characters, this will return the unescaped version. Example: "Test\\nstring" becomes "Test\nstring"

메소드 상세

ContainsKey() 공개 정적인 메소드

public static ContainsKey ( this value, string key ) : bool
value this
key string
리턴 bool

GetValue() 공개 정적인 메소드

public static GetValue ( this value, string key ) : ushort
value this
key string
리턴 ushort

SafeContains() 공개 정적인 메소드

public static SafeContains ( this value, char needle ) : bool
value this
needle char
리턴 bool

SafeIndexOf() 공개 정적인 메소드

public static SafeIndexOf ( this value, char needle ) : int
value this
needle char
리턴 int

SafeIndexOf() 공개 정적인 메소드

public static SafeIndexOf ( this value, char needle, int startIndex ) : int
value this
needle char
startIndex int
리턴 int

SafeIndexOfParenthesis() 공개 정적인 메소드

public static SafeIndexOfParenthesis ( this value, char needle ) : int
value this
needle char
리턴 int

SafeIndexOfParenthesis() 공개 정적인 메소드

public static SafeIndexOfParenthesis ( this value, char needle, int startIndex ) : int
value this
needle char
startIndex int
리턴 int

SafeSplit() 공개 정적인 메소드

Works the same as String.Split, but will not split if the requested characters are within a character or string literal.
public static SafeSplit ( this value ) : string[]
value this
리턴 string[]

TrimComments() 공개 정적인 메소드

Given a string, such as "SET A, B ; test", it removes all comments from that string.
public static TrimComments ( this value ) : string
value this
리턴 string

TrimExcessWhitespace() 공개 정적인 메소드

Removes unneccissary whitespace from a line of code.
public static TrimExcessWhitespace ( this value ) : string
value this
리턴 string

Unescape() 공개 정적인 메소드

Given a string with escaped characters, this will return the unescaped version. Example: "Test\\nstring" becomes "Test\nstring"
public static Unescape ( this value ) : string
value this
리턴 string