Метод | Описание | |
---|---|---|
EndsWith ( string str, char value ) : bool |
Determines if the string parameter 'str' ends with the character value.
|
|
IndexOf ( string src, char ch ) : int | ||
IndexOf ( string src, char ch, int idx ) : int | ||
IndexOfDigit ( string str ) : int |
Finds the index of the first digit.
|
|
IndexOfDigit ( string str, int startidx ) : int |
Finds the index of the first digit and starts from the index specified.
|
|
IndexOfIgnoreCase ( string src, string cmp ) : int |
Finds the start index of the comparison string regards of case.
|
|
IndexOfNonDigit ( string str ) : int |
Finds the index of the first non digit.
|
|
IndexOfNonDigit ( string str, int startidx ) : int |
Finds the index of the first non digit and starts from the index specified.
|
|
IsBlank ( string val ) : bool |
Checks if a String is whitespace, empty ("") or null. StringUtil.IsBlank(null) = true StringUtil.IsBlank("") = true StringUtil.IsBlank(" ") = true StringUtil.IsBlank("bob") = false StringUtil.IsBlank(" bob ") = false
|
|
IsEmpty ( string value ) : bool |
Determines if a string is empty. Empty is defined as null or empty string. StringUtil.IsEmpty(null) = true StringUtil.IsEmpty("") = true StringUtil.IsEmpty(" ") = false StringUtil.IsEmpty("bob") = false StringUtil.IsEmpty(" bob ") = false
|
|
IsNotBlank ( string val ) : bool |
Checks if a String is not empty (""), not null and not whitespace only. StringUtil.IsNotBlank(null) = false StringUtil.IsNotBlank("") = false StringUtil.IsNotBlank(" ") = false StringUtil.IsNotBlank("bob") = true StringUtil.IsNotBlank(" bob ") = true
|
|
IsNotEmpty ( string val ) : bool |
Determines if a string is not empty. Its the exact opposite for #IsEmpty(String).
|
|
IsTrue ( string val ) : bool | ||
IsWhitespace ( char ch ) : bool |
Determine if this is a white space character. Whitespace characters are defined as the character ' ' and the tab character.
|
|
NewGuardedString ( char val ) : GuardedString |
Constructs a secure string from a char []. The char[] will be cleared out when finished.
|
|
ParseLine ( string line, char fsep, char tqul ) : IList |
Parses a line into a List of strings.
|
|
RandomString ( ) : string |
Create a random Unicode string.
|
|
RandomString ( |
Create a random length Unicode string based on the Random object passed in.
|
|
RandomString ( |
Create a random string of fixed length based on the Random object passed in. Insure that the string is built w/ Unicode characters.
|
|
ReplaceVariable ( string o, string variable, string val ) : string |
Simple variable replacement internally using regular expressions. String o = "Some string with a ${variable} in it." String n = replaceVariable(o, "variable", "something"); String r = "Some string with a something in it" assert r.equals(n);
|
|
StripNewlines ( string src ) : string |
Removes newline characters (0x0a and 0x0d) from a string.
|
|
StripXmlAttribute ( string src, string attrName ) : string |
Removes the attribute from the source string and returns.
|
|
StripXmlComments ( string src ) : string |
Strip XML comments.
|
|
SubDigitString ( string str ) : string |
Return the string of digits from string.
|
|
SubDigitString ( string str, int idx ) : string |
Return the string of digits from string.
|
public static EndsWith ( string str, char value ) : bool | ||
str | string | /// String to check for the character at the end. |
value | char | /// The character to look for at the end of the string. |
Результат | bool |
public static IndexOf ( string src, char ch ) : int | ||
src | string | |
ch | char | |
Результат | int |
public static IndexOf ( string src, char ch, int idx ) : int | ||
src | string | |
ch | char | |
idx | int | |
Результат | int |
public static IndexOfDigit ( string str ) : int | ||
str | string | /// String to seach for a digit. |
Результат | int |
public static IndexOfDigit ( string str, int startidx ) : int | ||
str | string | /// String to search for a digit. |
startidx | int | /// Starting index from which to search |
Результат | int |
public static IndexOfIgnoreCase ( string src, string cmp ) : int | ||
src | string | /// String to search. |
cmp | string | /// Comparsion string to find. |
Результат | int |
public static IndexOfNonDigit ( string str ) : int | ||
str | string | /// String to seach for a non digit. |
Результат | int |
public static IndexOfNonDigit ( string str, int startidx ) : int | ||
str | string | /// String to seach for a non digit. |
startidx | int | /// Starting index from which to search. |
Результат | int |
public static IsBlank ( string val ) : bool | ||
val | string | /// the String to check, may be null /// |
Результат | bool |
public static IsEmpty ( string value ) : bool | ||
value | string | |
Результат | bool |
public static IsNotBlank ( string val ) : bool | ||
val | string | /// the String to check, may be null /// |
Результат | bool |
public static IsNotEmpty ( string val ) : bool | ||
val | string | /// string to evaluate. |
Результат | bool |
public static IsTrue ( string val ) : bool | ||
val | string | |
Результат | bool |
public static IsWhitespace ( char ch ) : bool | ||
ch | char | |
Результат | bool |
public static NewGuardedString ( char val ) : GuardedString | ||
val | char | The characters to use. Will be cleared /// out. |
Результат | GuardedString |
public static ParseLine ( string line, char fsep, char tqul ) : IList |
||
line | string | /// String to parse. |
fsep | char | /// Field separator |
tqul | char | /// Text qualifier. |
Результат | IList |
public static RandomString ( |
||
r | ||
Результат | string |
public static RandomString ( |
||
random | /// used to get random unicode characters. | |
length | int | /// fixed length of string. |
Результат | string |
public static ReplaceVariable ( string o, string variable, string val ) : string | ||
o | string | /// Original string to do the replacement on. |
variable | string | /// String representation of the variable to replace. |
val | string | /// Value to replace the variable with. |
Результат | string |
public static StripNewlines ( string src ) : string | ||
src | string | |
Результат | string |
public static StripXmlAttribute ( string src, string attrName ) : string | ||
src | string | |
attrName | string | |
Результат | string |
public static StripXmlComments ( string src ) : string | ||
src | string | |
Результат | string |
public static SubDigitString ( string str ) : string | ||
str | string | /// Source string to search. |
Результат | string |
public static SubDigitString ( string str, int idx ) : string | ||
str | string | /// Source string to search. |
idx | int | /// Start index from which to search. |
Результат | string |