Class StringExtensions
This static class contains extension methods for cleaning input strings of invalid characters. It does NOT sanitize input strings for protection against injection attacks (your parmemeterized queries should protect against that).
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: ArgentSea
Assembly: ArgentSea.dll
Syntax
public static class StringExtensions
Methods
| Improve this Doc View SourceCleanInput(String)
Removes leading/trailing whitespace, control charactors (cr, lf, tab, etc.), and emojis from input string.
Declaration
public static string CleanInput(this string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | Input string, resumably provided by user. |
Returns
| Type | Description |
|---|---|
| System.String | Input string with undesired characters removed. |
CleanInput(String, StringExtensions.InputCleaningOptions)
Declaration
public static string CleanInput(this string value, StringExtensions.InputCleaningOptions flags)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | |
| StringExtensions.InputCleaningOptions | flags |
Returns
| Type | Description |
|---|---|
| System.String |