Method StripNonDigits
StripNonDigits(String)
Removes all non-digit characters from a string and returns the result.
Declaration
public static string StripNonDigits(this string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string to strip values from. |
Returns
Type | Description |
---|---|
System.String | A string containing only the numeric characters of |
Remarks
If value contains only digits then this method returns value
and minimises allocations.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
System.ArgumentException | Thrown if |