C# Class Myre.Extensions.StringExtensions

A static class containing extension methods for the System.String class.
Afficher le fichier Open project: martindevans/Myre

Méthodes publiques

Méthode Description
EndsWith ( this s, char c ) : bool

Checks if the given string ends with the given character

StartsWith ( this s, char c ) : bool

Checks if the given string ends with the given character

TryToBool ( this value, bool &result ) : bool

Tries to convert this string into a bool.

TryToByte ( this value, byte &result ) : bool

Tries to convert this string into a byte.

TryToFloat ( this value, float &result ) : bool

Tries to convert this string into a float.

TryToInt ( this value, int &result ) : bool

Tries to convert this string into an int.

Method Details

EndsWith() public static méthode

Checks if the given string ends with the given character
public static EndsWith ( this s, char c ) : bool
s this
c char
Résultat bool

StartsWith() public static méthode

Checks if the given string ends with the given character
public static StartsWith ( this s, char c ) : bool
s this
c char
Résultat bool

TryToBool() public static méthode

Tries to convert this string into a bool.
public static TryToBool ( this value, bool &result ) : bool
value this The string to convert.
result bool The parsed bool.
Résultat bool

TryToByte() public static méthode

Tries to convert this string into a byte.
public static TryToByte ( this value, byte &result ) : bool
value this The string to convert.
result byte The parsed byte.
Résultat bool

TryToFloat() public static méthode

Tries to convert this string into a float.
public static TryToFloat ( this value, float &result ) : bool
value this The string to convert.
result float The parsed float.
Résultat bool

TryToInt() public static méthode

Tries to convert this string into an int.
public static TryToInt ( this value, int &result ) : bool
value this The string to convert.
result int The parsed int.
Résultat bool