Erweiterung der UnitTests und kleinere Fixes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace System
|
||||
{
|
||||
@@ -25,6 +26,9 @@ namespace System
|
||||
if (str.Length % 2 == 1)
|
||||
yield break;
|
||||
|
||||
if (Regex.IsMatch(str, "[^0-9a-fA-F]"))
|
||||
yield break;
|
||||
|
||||
for (int i = 0; i < str.Length; i += 2)
|
||||
yield return Convert.ToByte(str.Substring(i, 2), 16);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user