Метод | Описание | |
---|---|---|
AppendValueToEndIfMissing ( this source, string value ) : string |
Append the value to the source if the source is not null/whitespace and the source does not end with the value.
|
|
DefaultIfNullOrEmpty ( this source, string defaultValue ) : string |
Return the default value if the source value is null or empty.
|
|
Matches ( this validValues, string itemToMatch ) : bool |
checks to see if a supplied string matches with any item in the list allows for the following simple logic all currently case-insensitive * or *.* => match all items *xxx or *.xxx => EndsWith("xxx") xxx* or xxx.* => StartsWith("xxx") *xxx* or *.xxx.* => Contains("xxx") xxx => string.Compare() == 0
|
|
Matches ( this validValues, string itemToMatch, int &noOfMatchedCharacters ) : bool |
checks to see if a supplied string matches with any item in the list allows for the following simple logic all currently case-insensitive * or *.* => match all items *xxx or *.xxx => EndsWith("xxx") xxx* or xxx.* => StartsWith("xxx") *xxx* or *.xxx.* => Contains("xxx") xxx => string.Compare() == 0
|
public static AppendValueToEndIfMissing ( this source, string value ) : string | ||
source | this | Value to check. |
value | string | Value to append |
Результат | string |
public static DefaultIfNullOrEmpty ( this source, string defaultValue ) : string | ||
source | this | Value to check |
defaultValue | string | Default value |
Результат | string |
public static Matches ( this validValues, string itemToMatch ) : bool | ||
validValues | this | the list of expressions to match against |
itemToMatch | string | the string to match |
Результат | bool |
public static Matches ( this validValues, string itemToMatch, int &noOfMatchedCharacters ) : bool | ||
validValues | this | the list of expressions to match against |
itemToMatch | string | the string to match |
noOfMatchedCharacters | int | out parameter that returns the number of characters that was actually matched |
Результат | bool |