返回为字节json,排序
This commit is contained in:
parent
639a397814
commit
8c1549d57c
4
ai.go
4
ai.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue