返回为字节json,排序

This commit is contained in:
renzhiyuan 2025-07-24 18:28:28 +08:00
parent 639a397814
commit 8c1549d57c
1 changed files with 2 additions and 2 deletions

4
ai.go
View File

@ -19,7 +19,7 @@ func ExcelMatch(ctx context.Context, selfExcelHeader, matchToExcelHeader []strin
var char = v
char, isChange := cleanString(v)
if isChange {
specialChars[v] = char
specialChars[char] = v
}
withOutSpecialMatchToExcelHeader[k] = char
}
@ -47,7 +47,7 @@ func ExcelMatch(ctx context.Context, selfExcelHeader, matchToExcelHeader []strin
func cleanString(s string) (out string, isChange bool) {
var result []rune
for _, ch := range s {
if unicode.IsLetter(ch) || unicode.IsDigit(ch) || unicode.IsSpace(ch) || unicode.IsPunct(ch) {
if (unicode.IsLetter(ch) || unicode.IsDigit(ch) || unicode.IsSpace(ch) || unicode.IsPunct(ch)) && (ch != '*') {
result = append(result, ch)
} else {
isChange = true