Class StringExtensions
public static class StringExtensions
- Inheritance
-
StringExtensions
- Inherited Members
Methods
Deobfuscate(string, string?)
public static string? Deobfuscate(this string target, string? salt = null)
Parameters
Returns
Obfuscate(string, string?)
Note that this method, without a salt, provides obfuscation but should not be considered cryptologically secure.
public static string? Obfuscate(this string target, string? salt = null)
Parameters
Returns
ParseEnumOrDefault<T>(string, T)
Parses a string into an enum value or returns the default value specified.
public static T ParseEnumOrDefault<T>(this string value, T defaultValue) where T : struct
Parameters
value
stringdefaultValue
T
Returns
- T
Type Parameters
T
RandomString(int, RandomStringOptions, char[]?, char[]?)
public static string RandomString(int length, RandomStringOptions options, char[]? exclusions = null, char[]? inclusions = null)
Parameters
length
intoptions
RandomStringOptionsexclusions
char[]inclusions
char[]
Returns
Truncate(string, int)
Truncates a string to the maximum length specified.
public static string Truncate(this string target, int maxLength)