C# Class Meek.StringExtension

Show file Open project: klintz/Meek

Public Methods

Method Description
Contains ( this source, string toCheck, System.StringComparison comparison ) : bool

Checks if the source string contains the specified string to check based on the comparison contstraint

IsInteger ( this source ) : bool

Checks if the string value is an integer

IsIntegerOnly ( this source ) : bool

Checks if the string contains integers only

IsNumber ( this source, bool floatpoint ) : bool

Checks if the specified string is a number

IsNumberOnly ( this source, bool floatpoint ) : bool

Checks if the string contains only digits or float-point

IsValidEmailAddress ( this source ) : bool

Returns true if the source string is a valid Email Address Format

IsValidUrl ( this source ) : bool

Checks if the String is a valid URL format

MD5 ( this source ) : string

Converts string into MD5 hash

Nl2Br ( this source ) : string

Replaces strings line breaks with html tag

Reduce ( this source, int count ) : string

Reduce String to shorter preview

Reduce ( this source, int count, string endings ) : string

Reduce String to shorter preview with a specified ending string

RemoveDiacritics ( this source ) : string

Removes diacritics character in a string

RemoveSpaces ( this source ) : string

Removes all emtpy spaces

Reverse ( this source ) : string

Reverse the source string

UrlAvailable ( this source ) : bool

Checks if the URL string is available

Method Details

Contains() public static method

Checks if the source string contains the specified string to check based on the comparison contstraint
public static Contains ( this source, string toCheck, System.StringComparison comparison ) : bool
source this Source String
toCheck string String to Check
comparison System.StringComparison StringComparison constraint
return bool

IsInteger() public static method

Checks if the string value is an integer
public static IsInteger ( this source ) : bool
source this source string
return bool

IsIntegerOnly() public static method

Checks if the string contains integers only
public static IsIntegerOnly ( this source ) : bool
source this source string
return bool

IsNumber() public static method

Checks if the specified string is a number
public static IsNumber ( this source, bool floatpoint ) : bool
source this source string
floatpoint bool floating point flag
return bool

IsNumberOnly() public static method

Checks if the string contains only digits or float-point
public static IsNumberOnly ( this source, bool floatpoint ) : bool
source this source string
floatpoint bool float point flag
return bool

IsValidEmailAddress() public static method

Returns true if the source string is a valid Email Address Format
public static IsValidEmailAddress ( this source ) : bool
source this String to Check format
return bool

IsValidUrl() public static method

Checks if the String is a valid URL format
public static IsValidUrl ( this source ) : bool
source this String to Check
return bool

MD5() public static method

Converts string into MD5 hash
public static MD5 ( this source ) : string
source this string
return string

Nl2Br() public static method

Replaces strings line breaks with html tag
public static Nl2Br ( this source ) : string
source this string
return string

Reduce() public static method

Reduce String to shorter preview
public static Reduce ( this source, int count ) : string
source this source string
count int reduce length
return string

Reduce() public static method

Reduce String to shorter preview with a specified ending string
public static Reduce ( this source, int count, string endings ) : string
source this source string
count int reduce length
endings string ending string
return string

RemoveDiacritics() public static method

Removes diacritics character in a string
public static RemoveDiacritics ( this source ) : string
source this string
return string

RemoveSpaces() public static method

Removes all emtpy spaces
public static RemoveSpaces ( this source ) : string
source this source string
return string

Reverse() public static method

Reverse the source string
public static Reverse ( this source ) : string
source this String to be reversed
return string

UrlAvailable() public static method

Checks if the URL string is available
public static UrlAvailable ( this source ) : bool
source this URL string
return bool