C# Class Extensions.StringExtensions

Extensions for String Class
Show file Open project: h07r0d/Netduino-Aquarium-Controller

Public Methods

Method Description
Contains ( this _src, char _search ) : bool

Does the string contain the character being searched for?

Contains ( this _src, string _search ) : bool

Does the string contain the text being searched for?

EasySplit ( this s, string seperator ) : string[]
PadLeft ( this _src, int _count, char _pad ) : string

Pad the left side of the string with a given number of a specific character

Replace ( this content, string find, string replace ) : string

Replace all occurances of the 'find' string with the 'replace' string.

Method Details

Contains() public static method

Does the string contain the character being searched for?
public static Contains ( this _src, char _search ) : bool
_src this string to search
_search char character to find
return bool

Contains() public static method

Does the string contain the text being searched for?
public static Contains ( this _src, string _search ) : bool
_src this string to search for text in
_search string text to find
return bool

EasySplit() public static method

public static EasySplit ( this s, string seperator ) : string[]
s this
seperator string
return string[]

PadLeft() public static method

Pad the left side of the string with a given number of a specific character
public static PadLeft ( this _src, int _count, char _pad ) : string
_src this string to pad
_count int number of characters to add
_pad char character to use as padding
return string

Replace() public static method

Replace all occurances of the 'find' string with the 'replace' string.
public static Replace ( this content, string find, string replace ) : string
content this Original string to operate on
find string String to find within the original string
replace string String to be used in place of the find string
return string