C# Class Myre.Extensions.StringExtensions

A static class containing extension methods for the System.String class.
Mostrar archivo Open project: martindevans/Myre

Public Methods

Method 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 method

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

StartsWith() public static method

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

TryToBool() public static method

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.
return bool

TryToByte() public static method

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.
return bool

TryToFloat() public static method

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.
return bool

TryToInt() public static method

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.
return bool