C# Class Cimbalino.Phone.Toolkit.Extensions.StringExtensions

Provides a set of static (Shared in Visual Basic) methods for string instances
Afficher le fichier Open project: Cimbalino/Cimbalino-Phone-Toolkit

Méthodes publiques

Méthode Description
FormatWith ( this format ) : string

Replaces one or more format items in the string with the string representation of a specified object.

FormatWith ( this format, IFormatProvider provider ) : string

Replaces one or more format items in the string with the string representation of a specified object.

FormatWithInvariantCulture ( this format ) : string

Replaces one or more format items in the string with the string representation of a specified object, using an CultureInfo.InvariantCulture.

FromBase64String ( this input ) : byte[]

Converts the string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array.

GetBytes ( this input ) : byte[]

Encodes all the characters in the string into a sequence of UTF8 bytes.

GetBytes ( this input, Encoding encoding ) : byte[]

Encodes all the characters in the string into a sequence of bytes, using the specified Encoding.

Left ( this input, int length ) : string

Returns a new string containing the specified number of characters from the left side of the current string.

RegexIsMatch ( this input, string pattern ) : bool

Indicates whether the regular expression finds a match in the input string using the regular expression specified in the pattern parameter.

RegexIsMatch ( this input, string pattern, RegexOptions options ) : bool

Indicates whether the regular expression finds a match in the input string, using the regular expression specified in the pattern parameter and the matching options supplied in the options parameter.

RegexMatch ( this input, string pattern ) : Match

Searches the specified input string for the first occurrence of the regular expression supplied in the pattern parameter.

RegexMatch ( this input, string pattern, RegexOptions options ) : Match

Searches the input string for the first occurrence of the regular expression supplied in a pattern parameter with matching options supplied in an options parameter.

RegexMatches ( this input, string pattern ) : MatchCollection

Searches the specified input string for all occurrences of the regular expression specified in the pattern parameter.

RegexMatches ( this input, string pattern, RegexOptions options ) : MatchCollection

Searches the specified input string for all occurrences of the regular expression supplied in a pattern parameter with matching options supplied in an options parameter.

RegexReplace ( this input, string pattern, MatchEvaluator evaluator ) : string

Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate.

RegexReplace ( this input, string pattern, MatchEvaluator evaluator, RegexOptions options ) : string

Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate. Specified options modify the matching operation.

RegexReplace ( this input, string pattern, string replacement ) : string

Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.

RegexReplace ( this input, string pattern, string replacement, RegexOptions options ) : string

Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. Specified options modify the matching operation.

RemoveLeft ( this input, int length ) : string

Returns a new string in which a specified number of characters from the left side of the current string are deleted.

RemoveRight ( this input, int length ) : string

Returns a new string in which a specified number of characters from the right side of the current string are deleted.

Right ( this input, int length ) : string

Returns a new string containing the specified number of characters from the right side of the current string.

Times ( this input, int count ) : string

Returns a new string by repeating the current string the specified number of times.

Method Details

FormatWith() public static méthode

Replaces one or more format items in the string with the string representation of a specified object.
public static FormatWith ( this format ) : string
format this The composite format string.
Résultat string

FormatWith() public static méthode

Replaces one or more format items in the string with the string representation of a specified object.
public static FormatWith ( this format, IFormatProvider provider ) : string
format this The composite format string.
provider IFormatProvider An object that supplies culture-specific formatting information.
Résultat string

FormatWithInvariantCulture() public static méthode

Replaces one or more format items in the string with the string representation of a specified object, using an CultureInfo.InvariantCulture.
public static FormatWithInvariantCulture ( this format ) : string
format this The composite format string.
Résultat string

FromBase64String() public static méthode

Converts the string, which encodes binary data as base-64 digits, to an equivalent 8-bit unsigned integer array.
public static FromBase64String ( this input ) : byte[]
input this The current string.
Résultat byte[]

GetBytes() public static méthode

Encodes all the characters in the string into a sequence of UTF8 bytes.
public static GetBytes ( this input ) : byte[]
input this The current string.
Résultat byte[]

GetBytes() public static méthode

Encodes all the characters in the string into a sequence of bytes, using the specified Encoding.
public static GetBytes ( this input, Encoding encoding ) : byte[]
input this The current string.
encoding System.Text.Encoding The to use for encoding the characters.
Résultat byte[]

Left() public static méthode

Returns a new string containing the specified number of characters from the left side of the current string.
public static Left ( this input, int length ) : string
input this The current string.
length int The number of characters to return. If 0, a zero-length string ("") is returned. If greater than or equal to the number of characters in the string, the entire string is returned.
Résultat string

RegexIsMatch() public static méthode

Indicates whether the regular expression finds a match in the input string using the regular expression specified in the pattern parameter.
public static RegexIsMatch ( this input, string pattern ) : bool
input this The string to search for a match.
pattern string The regular expression pattern to match.
Résultat bool

RegexIsMatch() public static méthode

Indicates whether the regular expression finds a match in the input string, using the regular expression specified in the pattern parameter and the matching options supplied in the options parameter.
public static RegexIsMatch ( this input, string pattern, RegexOptions options ) : bool
input this The string to search for a match.
pattern string The regular expression pattern to match.
options RegexOptions A bitwise combination of the enumeration values.
Résultat bool

RegexMatch() public static méthode

Searches the specified input string for the first occurrence of the regular expression supplied in the pattern parameter.
public static RegexMatch ( this input, string pattern ) : Match
input this The string to be tested for a match.
pattern string The regular expression pattern to match.
Résultat Match

RegexMatch() public static méthode

Searches the input string for the first occurrence of the regular expression supplied in a pattern parameter with matching options supplied in an options parameter.
public static RegexMatch ( this input, string pattern, RegexOptions options ) : Match
input this The string to be tested for a match.
pattern string The regular expression pattern to match.
options RegexOptions A bitwise combination of the enumeration values.
Résultat Match

RegexMatches() public static méthode

Searches the specified input string for all occurrences of the regular expression specified in the pattern parameter.
public static RegexMatches ( this input, string pattern ) : MatchCollection
input this The string to search for a match.
pattern string The regular expression pattern to match.
Résultat MatchCollection

RegexMatches() public static méthode

Searches the specified input string for all occurrences of the regular expression supplied in a pattern parameter with matching options supplied in an options parameter.
public static RegexMatches ( this input, string pattern, RegexOptions options ) : MatchCollection
input this The string to search for a match.
pattern string The regular expression pattern to match.
options RegexOptions A bitwise combination of the enumeration values.
Résultat MatchCollection

RegexReplace() public static méthode

Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate.
public static RegexReplace ( this input, string pattern, MatchEvaluator evaluator ) : string
input this The string to search for a match.
pattern string The regular expression pattern to match.
evaluator MatchEvaluator A custom method that examines each match and returns either the original matched string or a replacement string.
Résultat string

RegexReplace() public static méthode

Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate. Specified options modify the matching operation.
public static RegexReplace ( this input, string pattern, MatchEvaluator evaluator, RegexOptions options ) : string
input this The string to search for a match.
pattern string The regular expression pattern to match.
evaluator MatchEvaluator A custom method that examines each match and returns either the original matched string or a replacement string.
options RegexOptions A bitwise combination of the enumeration values.
Résultat string

RegexReplace() public static méthode

Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.
public static RegexReplace ( this input, string pattern, string replacement ) : string
input this The string to search for a match.
pattern string The regular expression pattern to match.
replacement string The replacement string.
Résultat string

RegexReplace() public static méthode

Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. Specified options modify the matching operation.
public static RegexReplace ( this input, string pattern, string replacement, RegexOptions options ) : string
input this The string to search for a match.
pattern string The regular expression pattern to match.
replacement string The replacement string.
options RegexOptions A bitwise combination of the enumeration values.
Résultat string

RemoveLeft() public static méthode

Returns a new string in which a specified number of characters from the left side of the current string are deleted.
public static RemoveLeft ( this input, int length ) : string
input this The current string.
length int The number of characters to remove. If greater than or equal to the number of characters in the string, an empty string is returned.
Résultat string

RemoveRight() public static méthode

Returns a new string in which a specified number of characters from the right side of the current string are deleted.
public static RemoveRight ( this input, int length ) : string
input this The current string.
length int The number of characters to remove. If greater than or equal to the number of characters in the string, an empty string is returned.
Résultat string

Right() public static méthode

Returns a new string containing the specified number of characters from the right side of the current string.
public static Right ( this input, int length ) : string
input this The current string.
length int The number of characters to return. If 0, a zero-length string ("") is returned. If greater than or equal to the number of characters in the string, the entire string is returned.
Résultat string

Times() public static méthode

Returns a new string by repeating the current string the specified number of times.
public static Times ( this input, int count ) : string
input this The current string.
count int The number of times the current string occurs.
Résultat string