Update
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using ConsoleApp2.Entities;
|
||||
|
||||
namespace ConsoleApp2.Helpers;
|
||||
|
||||
@@ -73,19 +75,24 @@ public static partial class DumpDataHelper
|
||||
if (str.StartsWith('\"'))
|
||||
return false;
|
||||
|
||||
var isDigit = true;
|
||||
var isAllDigit = true;
|
||||
|
||||
foreach (var c in str)
|
||||
{
|
||||
if (!char.IsAsciiHexDigit(c))
|
||||
return false;
|
||||
if (!char.IsNumber(c))
|
||||
isDigit = false;
|
||||
isAllDigit = false;
|
||||
}
|
||||
|
||||
if (isDigit)
|
||||
if (isAllDigit) //避免全数字
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// public static string EliminateEscapeChars(ReadOnlySpan<char> str)
|
||||
// {
|
||||
// char[] escapeChars = ['0','\''];
|
||||
// }
|
||||
}
|
Reference in New Issue
Block a user