This commit is contained in:
陈兔子
2025-12-20 17:26:36 +08:00
parent d7d81d9a52
commit 97188bbe90

View File

@@ -71,11 +71,9 @@ func (this *UnityClass) Keys(param any, reg ...any) (keys []any) {
// 去重 - 去空
keys = ArrayUnique(ArrayEmpty(keys))
// 遍历每一项,去空格
for key, val := range keys {
keys[key] = regexp.MustCompile(`\s+`).ReplaceAllString(cast.ToString(val), "")
}
// 遍历每一项,去除首尾空格
for key, val := range keys { keys[key] = strings.TrimSpace(cast.ToString(val)) }
return keys
}