Class StringExtensions
Extension methods for strings.
Inheritance
System.Object
StringExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Dangl
Assembly: Dangl.Common.dll
Syntax
public static class StringExtensions
Methods
| Improve this Doc View SourceCompress(String)
Returns the Base64 representation of the string after having applied GZip compression.
Declaration
public static string Compress(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
System.String |
Decompress(String)
Decompresses a string from a Base64 GZip string.
Declaration
public static string Decompress(this string souce)
Parameters
Type | Name | Description |
---|---|---|
System.String | souce |
Returns
Type | Description |
---|---|
System.String |
FromBase64(String)
Will return the plain text deoced from a Base64 string representation.
Declaration
public static string FromBase64(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
System.String |
Sanitize(String)
Will replace all linebreaks with System.Environment.NewLine and remove white spaces as line ends as well as any trailing white spaces.
Declaration
public static string Sanitize(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
System.String |
ToBase64(String)
Will return a Base64 representation of the string.
Declaration
public static string ToBase64(this string source)
Parameters
Type | Name | Description |
---|---|---|
System.String | source |
Returns
Type | Description |
---|---|
System.String |