C# Class UlteriusServer.Utilities.Extensions.StringExtensions

Class StringExtensions
Show file Open project: Ulterius/server

Public Methods

Method Description
CommaSeparate ( this @this ) : string[]

Splits a string into an array of strings, the string is split by commas.

CreateMD5 ( this input ) : string
EqualsIgnoreCase ( this @this, string other ) : bool

Determines whether two String objects contain the same data, ignoring the case of the letters in the String; uses Ordinal comparison.

Form ( this format ) : string

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

FormatString ( string format, FormatTokenFlags flags ) : string

The Function which does all the heavy lifting.

GetBytesReadable ( long i ) : string
Initialize ( ) : void
IsBase64String ( this s ) : bool
IsValidJson ( this strInput ) : bool
ToSecureString ( this Source ) : SecureString

Returns a Secure string from the source string

ToUnsecureString ( this secureString ) : string
UnicodeUtf8 ( this strFrom ) : string

Method Details

CommaSeparate() public static method

Splits a string into an array of strings, the string is split by commas.
public static CommaSeparate ( this @this ) : string[]
@this this
return string[]

CreateMD5() public static method

public static CreateMD5 ( this input ) : string
input this
return string

EqualsIgnoreCase() public static method

Determines whether two String objects contain the same data, ignoring the case of the letters in the String; uses Ordinal comparison.
public static EqualsIgnoreCase ( this @this, string other ) : bool
@this this
other string The other string to compare against the current String for equality.
return bool

Form() public static method

Replaces one or more format items in a specified string with the string representation of a specified object.
public static Form ( this format ) : string
format this A composite format string.
return string

FormatString() public static method

The Function which does all the heavy lifting.
public static FormatString ( string format, FormatTokenFlags flags ) : string
format string A composite format string
flags FormatTokenFlags The flags which specify how the string should be interpreted.
return string

GetBytesReadable() public static method

public static GetBytesReadable ( long i ) : string
i long
return string

Initialize() public static method

public static Initialize ( ) : void
return void

IsBase64String() public static method

public static IsBase64String ( this s ) : bool
s this
return bool

IsValidJson() public static method

public static IsValidJson ( this strInput ) : bool
strInput this
return bool

ToSecureString() public static method

Returns a Secure string from the source string
public static ToSecureString ( this Source ) : SecureString
Source this
return System.Security.SecureString

ToUnsecureString() public static method

public static ToUnsecureString ( this secureString ) : string
secureString this
return string

UnicodeUtf8() public static method

public static UnicodeUtf8 ( this strFrom ) : string
strFrom this
return string