Метод | Описание | |
---|---|---|
Camelize ( this input, bool capitalizeFirst = false ) : string |
Converts the input to camelCase
|
|
ChopEnd ( this source ) : string |
Remove whitespace from source, and trim off any stringsToRemove if source ends with it
|
|
ChopStart ( this source ) : string |
Remove whitespace from source, and trim off stringToRemove if source starts with it
|
|
ContainsAll ( this source ) : bool | ||
ContainsAll ( this source, IEnumerable |
||
ContainsAny ( this source ) : bool | ||
ContainsAny ( this source, IEnumerable |
||
EscapePowerShell ( this sentence ) : string |
Assuming that your string in PowerShell is wrapped in double quotes, this will escape all of the characters in your sentence so that you can have things like passwords with back-ticks, ampersands, single-quotes, etc.
|
|
Excerpt ( this original, int maxLength ) : string |
Limit the length of a string while keeping words intact, and adding ... to the end
|
|
FormatFromDictionary ( this str, string>.IDictionary |
Functions like string.Format, only with a dictionary of values From: http://stackoverflow.com/questions/1010123/named-string-format-is-it-possible-c
|
|
IsNullOrEmpty ( this source ) : bool |
Just a wrapper around String.IsNullOrEmpty so you can call it inline
|
|
Join ( this |
Joins a list of strings together into a single string
|
|
Print ( this s ) : string | This exists so that the compiler doesn't get confused and call the IEnumerable[char] version of Print on a string. Then you would get "(a,b)" from "ab".Print(), which is silly | |
RemoveEnd ( this source, int count ) : string |
Removes the last 'count' number of characters. If the ask to remove a greater number of characters than exist in source returns an empty string.
|
|
Repeat ( this source, int times ) : string |
Repeat a string times times
|
|
RetrieveIntFromAString ( string input ) : string |
This method retrieves digits from a string
|
|
SentenceCase ( this sentence ) : string | ||
Split ( this source, string splitby ) : string[] |
Returns a string array that contains the substrings in this string that are delimited by elements of a specified string array. A parameter specifies whether to return empty array elements.
|
|
SplitPair ( this source, string splitby ) : string[] |
Returns an array of two strings that are separated by the specified string.
|
|
Strip ( this source ) : string |
Removes all instances of the supplied victims string(s) This is not the same as Trim |
|
SubstringAfter ( this source, string splitter ) : string |
Gets the part of the string that comes after the given token. If the given token is not in the string, this returns null.
|
|
SubstringBefore ( this source, string splitter ) : string |
Gets the part of the string that comes before the given token. If the given token is not in the string, this returns null.
|
|
ToLength ( this source, int length ) : string |
Make the string the specified length - truncating or appending spaces as necessary
|
|
ToStringN ( this source ) : string |
Converts to string, but handles null gracefully (converts to "")
|
|
Tokenize ( this source ) : IEnumerable |
Splits the string by spaces
|
|
Tokenize ( this source, string regexExpression ) : IEnumerable |
|
|
TrimN ( this source ) : string |
Trim(), but handle nulls, leaving them as nulls
|
|
Truncate ( this source, int maxLength ) : string |
Truncates a string down to the specified maxLength
|
|
UnCamelize ( this input, bool unCapitalize = false ) : string |
Converts the input from camelCase to space seperated
|
Метод | Описание | |
---|---|---|
FindIntInString ( string input ) : string | ||
GetEmailInParenthesis ( this source ) : string | ||
GetIntegerInParenthesis ( this source ) : int? | ||
NumTimesCharacterRepeatsAtEnd ( this original, char charToCheck ) : int | ||
RetrieveIntInString ( string input ) : int | ||
SemiClean ( string input ) : string | ||
ToDoubleAsStringOr0 ( this source ) : string | ||
ToIntOr0 ( this source ) : int | ||
Tokenize ( this source, |
|
public static Camelize ( this input, bool capitalizeFirst = false ) : string | ||
input | this | |
capitalizeFirst | bool | |
Результат | string |
public static ChopEnd ( this source ) : string | ||
source | this | |
Результат | string |
public static ChopStart ( this source ) : string | ||
source | this | |
Результат | string |
public static ContainsAll ( this source ) : bool | ||
source | this | |
Результат | bool |
public static ContainsAll ( this source, IEnumerable |
||
source | this | |
strings | IEnumerable |
|
Результат | bool |
public static ContainsAny ( this source ) : bool | ||
source | this | |
Результат | bool |
public static ContainsAny ( this source, IEnumerable |
||
source | this | |
strings | IEnumerable |
|
Результат | bool |
public static EscapePowerShell ( this sentence ) : string | ||
sentence | this | |
Результат | string |
public static Excerpt ( this original, int maxLength ) : string | ||
original | this | String to make an excerpt of |
maxLength | int | Maximum length of the string (including the ...) |
Результат | string |
public static FormatFromDictionary ( this str, string>.IDictionary |
||
str | this | String to form |
dict | string>.IDictionary | Dictionary to retrieve values from |
Результат | string |
public static IsNullOrEmpty ( this source ) : bool | ||
source | this | |
Результат | bool |
public static Join ( this |
||
source | this |
|
seperator | string | |
Результат | string |
public static RemoveEnd ( this source, int count ) : string | ||
source | this | |
count | int | |
Результат | string |
public static Repeat ( this source, int times ) : string | ||
source | this | |
times | int | |
Результат | string |
public static RetrieveIntFromAString ( string input ) : string | ||
input | string | anything in a string |
Результат | string |
public static SentenceCase ( this sentence ) : string | ||
sentence | this | |
Результат | string |
public static Split ( this source, string splitby ) : string[] | ||
source | this | The source string, usually the object you're calling the Extension method on. |
splitby | string | The token to split by. |
Результат | string[] |
public static SplitPair ( this source, string splitby ) : string[] | ||
source | this | The source string to be split into two items. |
splitby | string | The string that the source is to be split by. |
Результат | string[] |
public static Strip ( this source ) : string | ||
source | this | |
Результат | string |
public static SubstringAfter ( this source, string splitter ) : string | ||
source | this | The source string, usually the object you're calling the Extension method on. |
splitter | string | The token to look for and use to split the string in two pieces |
Результат | string |
public static SubstringBefore ( this source, string splitter ) : string | ||
source | this | The source string, usually the object you're calling the Extension method on. |
splitter | string | The token to look for and use to split the string in two pieces |
Результат | string |
public static ToLength ( this source, int length ) : string | ||
source | this | |
length | int | |
Результат | string |
public static ToStringN ( this source ) : string | ||
source | this | |
Результат | string |
public static Tokenize ( this source ) : IEnumerable |
||
source | this | |
Результат | IEnumerable |
public static Tokenize ( this source, string regexExpression ) : IEnumerable |
||
source | this | |
regexExpression | string | An regex used to tokenize the string - the entire contents of the expression will /// be removed with each iteration, and the value of group 1 will be returned as the token value |
Результат | IEnumerable |
public static TrimN ( this source ) : string | ||
source | this | |
Результат | string |
public static Truncate ( this source, int maxLength ) : string | ||
source | this | |
maxLength | int | |
Результат | string |
public static UnCamelize ( this input, bool unCapitalize = false ) : string | ||
input | this | |
unCapitalize | bool | |
Результат | string |