Méthode | 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. |
Résultat | bool |
public static EnsureEndsWith ( this source, string value ) : string | ||
source | this | The source string. |
value | string | The value to append. |
Résultat | string |
public static Format ( this source, string>.IDictionary |
||
source | this | The source string. |
replacements | string>.IDictionary | The replacement values. |
Résultat | string |
public static Format ( this source, object replacements ) : string | ||
source | this | The source string. |
replacements | object | The replacement values - must be an anonymous type. |
Résultat | string |
public static IsNotNullOrEmpty ( this source ) : bool | ||
source | this | The string to test. |
Résultat | bool |
public static IsNotNullOrWhiteSpace ( this source ) : bool | ||
source | this | The string to test. |
Résultat | bool |
public static IsNullOrEmpty ( this source ) : bool | ||
source | this | The string to test. |
Résultat | bool |
public static IsNullOrWhiteSpace ( this source ) : bool | ||
source | this | The string to test. |
Résultat | 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. |
Résultat | 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. |
Résultat | 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. |
Résultat | string |
public static Reverse ( this source ) : string | ||
source | this | The source. |
Résultat | string |
public static ToInt32 ( this source ) : int | ||
source | this | The source containing a number to convert. |
Résultat | int |
public static Trim ( this source, string trim ) : string | ||
source | this | The source. |
trim | string | The string to remove. |
Résultat | string |