Method | Description | |
---|---|---|
DoesNotEndWith ( this source, string value ) : bool |
Determines whether the end of this string instance does not match the specified string.
|
|
EnsureEndsWith ( this source, string value ) : string |
Returns the current string instance with the specified value appended, if the current string instance does not already end with the specified value.
|
|
Format ( this source, string>.IDictionary |
Returns a new string in which all occurrences of the specified tokens in the current instance are replaced with the provided replacement values. A token is designated in a string by surrounding it with curly braces (example: {MyToken}). A token must consist of one or more valid "word characters" (think valid variable name) and is case-sensitive. Curly braces can be escaped by using double braces. The double braces will be replaced with single braces (example: "{{something}}" becomes "{something}"). Any token without a replacement value specified will be untouched and appear in the returned string exactly as in the source.
|
|
Format ( this source, object replacements ) : string |
Returns a new string in which all occurrences of the specified tokens in the current instance are replaced with the provided replacement values. A token is designated in a string by surrounding it with curly braces (example: {MyToken}). A token must consist of one or more valid "word characters" (think valid variable name) and is case-sensitive. Curly braces can be escaped by using double braces. The double braces will be replaced with single braces (example: "{{something}}" becomes "{something}"). Any token without a replacement value specified will be untouched and appear in the returned string exactly as in the source.
|
|
IsNotNullOrEmpty ( this source ) : bool |
Indicates whether the current string is not null and not an System.String.Empty string.
|
|
IsNotNullOrWhiteSpace ( this source ) : bool |
Indicates whether the current string is not null, not empty, and does not consist only of white-space characters.
|
|
IsNullOrEmpty ( this source ) : bool |
Indicates whether the current string is null or an System.String.Empty string.
|
|
IsNullOrWhiteSpace ( this source ) : bool |
Indicates whether the current string is null, empty, or consists only of white-space characters.
|
|
PadNumber ( this source, int maxNumberToMatch, char paddingChar = '0' ) : string |
Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a total length equal to that of the length of the maximum number to match.
|
|
PadNumber ( this source, long maxNumberToMatch, char paddingChar = '0' ) : string |
Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a total length equal to that of the length of the maximum number to match.
|
|
PadNumber ( this source, uint maxNumberToMatch, char paddingChar = '0' ) : string |
Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified Unicode character, for a total length equal to that of the length of the maximum number to match.
|
|
Reverse ( this source ) : string |
Reverses the sequence of the characters in the entire string.
|
|
ToInt32 ( this source ) : int |
Converts the current string representation of a number to its 32-bit signed integer equivalent.
|
|
Trim ( this source, string trim ) : string |
Removes all leading and trailing occurrences of the given string from the current String object.
|
public static DoesNotEndWith ( this source, string value ) : bool | ||
source | this | The string to test. |
value | string | The string to compare to the substring at the end of this instance. |
return | bool |
public static EnsureEndsWith ( this source, string value ) : string | ||
source | this | The source string. |
value | string | The value to append. |
return | string |
public static Format ( this source, string>.IDictionary |
||
source | this | The source string. |
replacements | string>.IDictionary | The replacement values. |
return | string |
public static Format ( this source, object replacements ) : string | ||
source | this | The source string. |
replacements | object | The replacement values - must be an anonymous type. |
return | string |
public static IsNotNullOrEmpty ( this source ) : bool | ||
source | this | The string to test. |
return | bool |
public static IsNotNullOrWhiteSpace ( this source ) : bool | ||
source | this | The string to test. |
return | bool |
public static IsNullOrEmpty ( this source ) : bool | ||
source | this | The string to test. |
return | bool |
public static IsNullOrWhiteSpace ( this source ) : bool | ||
source | this | The string to test. |
return | bool |
public static PadNumber ( this source, int maxNumberToMatch, char paddingChar = '0' ) : string | ||
source | this | The source. |
maxNumberToMatch | int | The maximum number to match. |
paddingChar | char | A Unicode padding character. |
return | string |
public static PadNumber ( this source, long maxNumberToMatch, char paddingChar = '0' ) : string | ||
source | this | The source. |
maxNumberToMatch | long | The maximum number to match. |
paddingChar | char | A Unicode padding character. |
return | string |
public static PadNumber ( this source, uint maxNumberToMatch, char paddingChar = '0' ) : string | ||
source | this | The source. |
maxNumberToMatch | uint | The maximum number to match. |
paddingChar | char | A Unicode padding character. |
return | string |
public static Reverse ( this source ) : string | ||
source | this | The source. |
return | string |
public static ToInt32 ( this source ) : int | ||
source | this | The source containing a number to convert. |
return | int |
public static Trim ( this source, string trim ) : string | ||
source | this | The source. |
trim | string | The string to remove. |
return | string |