mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
feat: Additional validation
This commit is contained in:
parent
2fab5d6fd4
commit
1a931e6ffb
1 changed files with 6 additions and 0 deletions
|
|
@ -165,6 +165,9 @@ namespace ICD.Common.Utils
|
|||
[PublicAPI]
|
||||
public static byte[] ToBytes(string input)
|
||||
{
|
||||
if (input == null)
|
||||
throw new ArgumentNullException("input");
|
||||
|
||||
return Encoding.GetEncoding(28591).GetBytes(input);
|
||||
}
|
||||
|
||||
|
|
@ -315,6 +318,9 @@ namespace ICD.Common.Utils
|
|||
/// <returns></returns>
|
||||
public static string NiceName(string name)
|
||||
{
|
||||
if (name == null)
|
||||
throw new ArgumentNullException("name");
|
||||
|
||||
Regex regex = new Regex(@"
|
||||
(?<=[A-Z])(?=[A-Z][a-z]) |
|
||||
(?<=[^A-Z])(?=[A-Z]) |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue