C# Class SystemEx.Escaping

Contains utility methods for escaping and unescaping strings.
Show file Open project: pvginkel/SystemEx

Public Methods

Method Description
Base64Decode ( string data ) : byte[]
Base64Encode ( byte data ) : string
HtmlDecode ( string value ) : string

Decodes a string using HTML encoding.

HtmlEncode ( string value ) : string

Encodes a string using HTML encoding.

StringDecode ( string value ) : string
StringEncode ( string value ) : string

Encodes a string using C encoding with " as the quote char.

StringEncode ( string value, bool enclose ) : string
StringEncode ( string value, char quoteChar ) : string

Encodes a string using C encoding with quoteChar as the quote char.

StringEncode ( string value, char quoteChar, bool enclose ) : string

Encodes a string using C encoding with quoteChar as the quote char.

UriDecode ( string value ) : string

Decodes a string using URI encoding.

UriEncode ( string value ) : string

Encodes a string using URI encoding.

UrlDecode ( string value ) : string>.Dictionary
UrlEncode ( string>.Dictionary value ) : string

Private Methods

Method Description
Escaping ( ) : System

Method Details

Base64Decode() public static method

public static Base64Decode ( string data ) : byte[]
data string
return byte[]

Base64Encode() public static method

public static Base64Encode ( byte data ) : string
data byte
return string

HtmlDecode() public static method

Decodes a string using HTML encoding.
public static HtmlDecode ( string value ) : string
value string The string to be decoded.
return string

HtmlEncode() public static method

Encodes a string using HTML encoding.
public static HtmlEncode ( string value ) : string
value string The string to encode.
return string

StringDecode() public static method

public static StringDecode ( string value ) : string
value string
return string

StringEncode() public static method

Encodes a string using C encoding with " as the quote char.
public static StringEncode ( string value ) : string
value string The string to encode.
return string

StringEncode() public static method

public static StringEncode ( string value, bool enclose ) : string
value string
enclose bool
return string

StringEncode() public static method

Encodes a string using C encoding with quoteChar as the quote char.
public static StringEncode ( string value, char quoteChar ) : string
value string The string to encode.
quoteChar char The character used to quote the string. The default /// value for this parameter is ".
return string

StringEncode() public static method

Encodes a string using C encoding with quoteChar as the quote char.
public static StringEncode ( string value, char quoteChar, bool enclose ) : string
value string The string to encode.
quoteChar char The character used to quote the string. The default /// value for this parameter is ".
enclose bool
return string

UriDecode() public static method

Decodes a string using URI encoding.
public static UriDecode ( string value ) : string
value string The string to decode.
return string

UriEncode() public static method

Encodes a string using URI encoding.
public static UriEncode ( string value ) : string
value string The string to encode.
return string

UrlDecode() public static method

public static UrlDecode ( string value ) : string>.Dictionary
value string
return string>.Dictionary

UrlEncode() public static method

public static UrlEncode ( string>.Dictionary value ) : string
value string>.Dictionary
return string