C# 클래스 csShared.Utils.StringUtils

파일 보기 프로젝트 열기: TNOCS/csTouch

공개 메소드들

메소드 설명
AppendIfExists ( string div, string val ) : string
CompareAlphaNumeric ( string a, string b ) : int

Comparison delegate for strings that contain letters and numbers. Improves upon standard string comparisons where "A11" comes before "A2". Usage: Array.Sort(list, StringUtils.CompareAlphaNumeric);

ExtractNumber ( string numStr ) : int
FindNumericEnd ( int start, string numStr ) : int
FindNumericEnd ( string numStr ) : int
FindNumericStart ( string numStr ) : int
GetSmartPlural ( int num, string noun ) : string

Get phrase in present tense: e.g. there "are no boxes" selected; there "is one box" selected; there "are 5 boxes" selected

GetSmartPlural ( int num, string noun, string addToMakePlural ) : string
GetSmartPluralPastTense ( int num, string noun ) : string

Get phrase in past tense: e.g. "no boxes were" selected; "one box was" selected; "5 boxes were" selected

GetSmartPluralPastTense ( int num, string noun, string addToMakePlural ) : string
IsAlphaNumeric ( char x ) : bool
IsAlphaNumeric ( string x ) : bool
IsNumeric ( object expression ) : bool
Join ( IEnumerable list, string delim ) : string
RemoveExcessWhiteSpace ( string str ) : string
RemoveFromFront ( string str, string frontStr ) : string
RenameFolder ( string oldDirPath, string proposedName ) : string
Split ( string str, string delim ) : string[]
SplitToList ( string str, string delim ) : List
SplitToList ( string str, string delim, bool trim ) : List
SubstringAlphaNumericAtPosition ( string str, int pos ) : string
SubstringBetween ( string str, string start, string end ) : string
UppercaseFirst ( this s ) : string
WildcardEquals ( string pattern, string str ) : bool
WildcardEquals ( string pattern, string str, bool ignoreCase ) : bool

비공개 메소드들

메소드 설명
CompareAlphaNumericNums ( string a, string b ) : int
WildcardEquals ( string pattern, int patternIdx, string stringRenamed, int stringIdx ) : bool

메소드 상세

AppendIfExists() 공개 정적인 메소드

public static AppendIfExists ( string div, string val ) : string
div string
val string
리턴 string

CompareAlphaNumeric() 공개 정적인 메소드

Comparison delegate for strings that contain letters and numbers. Improves upon standard string comparisons where "A11" comes before "A2". Usage: Array.Sort(list, StringUtils.CompareAlphaNumeric);
public static CompareAlphaNumeric ( string a, string b ) : int
a string
b string
리턴 int

ExtractNumber() 공개 정적인 메소드

public static ExtractNumber ( string numStr ) : int
numStr string
리턴 int

FindNumericEnd() 공개 정적인 메소드

public static FindNumericEnd ( int start, string numStr ) : int
start int
numStr string
리턴 int

FindNumericEnd() 공개 정적인 메소드

public static FindNumericEnd ( string numStr ) : int
numStr string
리턴 int

FindNumericStart() 공개 정적인 메소드

public static FindNumericStart ( string numStr ) : int
numStr string
리턴 int

GetSmartPlural() 공개 정적인 메소드

Get phrase in present tense: e.g. there "are no boxes" selected; there "is one box" selected; there "are 5 boxes" selected
public static GetSmartPlural ( int num, string noun ) : string
num int
noun string
리턴 string

GetSmartPlural() 공개 정적인 메소드

public static GetSmartPlural ( int num, string noun, string addToMakePlural ) : string
num int
noun string
addToMakePlural string
리턴 string

GetSmartPluralPastTense() 공개 정적인 메소드

Get phrase in past tense: e.g. "no boxes were" selected; "one box was" selected; "5 boxes were" selected
public static GetSmartPluralPastTense ( int num, string noun ) : string
num int
noun string
리턴 string

GetSmartPluralPastTense() 공개 정적인 메소드

public static GetSmartPluralPastTense ( int num, string noun, string addToMakePlural ) : string
num int
noun string
addToMakePlural string
리턴 string

IsAlphaNumeric() 공개 정적인 메소드

public static IsAlphaNumeric ( char x ) : bool
x char
리턴 bool

IsAlphaNumeric() 공개 정적인 메소드

public static IsAlphaNumeric ( string x ) : bool
x string
리턴 bool

IsNumeric() 공개 정적인 메소드

public static IsNumeric ( object expression ) : bool
expression object
리턴 bool

Join() 공개 정적인 메소드

public static Join ( IEnumerable list, string delim ) : string
list IEnumerable
delim string
리턴 string

RemoveExcessWhiteSpace() 공개 정적인 메소드

public static RemoveExcessWhiteSpace ( string str ) : string
str string
리턴 string

RemoveFromFront() 공개 정적인 메소드

public static RemoveFromFront ( string str, string frontStr ) : string
str string
frontStr string
리턴 string

RenameFolder() 공개 정적인 메소드

public static RenameFolder ( string oldDirPath, string proposedName ) : string
oldDirPath string
proposedName string
리턴 string

Split() 공개 정적인 메소드

public static Split ( string str, string delim ) : string[]
str string
delim string
리턴 string[]

SplitToList() 공개 정적인 메소드

public static SplitToList ( string str, string delim ) : List
str string
delim string
리턴 List

SplitToList() 공개 정적인 메소드

public static SplitToList ( string str, string delim, bool trim ) : List
str string
delim string
trim bool
리턴 List

SubstringAlphaNumericAtPosition() 공개 정적인 메소드

public static SubstringAlphaNumericAtPosition ( string str, int pos ) : string
str string
pos int
리턴 string

SubstringBetween() 공개 정적인 메소드

public static SubstringBetween ( string str, string start, string end ) : string
str string
start string
end string
리턴 string

UppercaseFirst() 공개 정적인 메소드

public static UppercaseFirst ( this s ) : string
s this
리턴 string

WildcardEquals() 공개 정적인 메소드

public static WildcardEquals ( string pattern, string str ) : bool
pattern string
str string
리턴 bool

WildcardEquals() 공개 정적인 메소드

public static WildcardEquals ( string pattern, string str, bool ignoreCase ) : bool
pattern string
str string
ignoreCase bool
리턴 bool