System.String extension methods

DecodeBase64()

Summary: Returns the String Base64 Decoded.

DecodeHtml()

Summary: Returns the String Html Decoded.

DecodeUrl()

Summary: Returns the String Url Decoded.

Decrypt<Algorithm>(string key, string iv = null)

Summary: Decrypts the Base64 encoded String using the given Encryption Algorithm and key.

EncodeBase64()

Summary: Returns the String Base64 Encoded.

EncodeHtml()

Summary: Returns the String Html Encoded.

EncodeUrl()

Summary: Returns the String Url Encoded.

Encrypt<Algorithm>(string key, string iv = null)

Summary: Encrypts the String using the given Encryption Algorithm and key. The Return value is also Base64 encoded.

IsEmpty()

Summary: Returns a boolean indicating whether the String is a System.String.Empty string.

IsNullOrEmpty()

Summary: Returns a boolean indicating whether the String is NULL or a System.String.Empty string.

IsNullOrWhiteSpace()

Summary: Returns a boolean indicating whether the String is NULL, Empty or consists only of white-space characters.

Left(int length)

Summary: Returns a string containing a speficied number of characters from the left side of a string.

Repeat(int repeatCount)

Summary: Retuns a String that is a concatenation of the source String repeated the specified number of times.
C# Example:
string str = "s".Repeat(5);
// returns "sssss"

Right(int length)

Summary: Returns a string containing a specified number of characters from the right side of a string.

ToByteArray()

Summary: Returns a Byte Array of the String using ASCIIEncoding.

ToByteArray<encoding>()

Summary: Returns a Byte Array of the String using the specified Encoding.

ToMD5Hash()

Summary: Returns an MD5 Hash from the specified string.

ToStream()

Summary: Returns a Stream representation of the String using ASCIIEncoding.

ToStream<encoding>()

Summary: Returns a Stream representation of the String using the specified Encoding.

Last edited Mar 16, 2013 at 12:23 PM by crpietschmann, version 3

Comments

No comments yet.