feat(*): 分镜与资产 - 完善五类资产、候选去重、搜索、中文镜头编号与分类整理
This commit is contained in:
1 parent
ce6e20f749
commit
f548681787
53 files changed
+816
-188
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
// AssetCandidateNameKey removes presentation differences from a candidate name.
|
||||
// The key is only an identity guard; the original name remains the display value.
|
||||
func AssetCandidateNameKey(value string) string {
|
||||
return strings.Map(func(r rune) rune {
|
||||
if unicode.IsLetter(r) || unicode.IsNumber(r) {
|
||||
return unicode.ToLower(r)
|
||||
}
|
||||
return -1
|
||||
}, strings.TrimSpace(value))
|
||||
}
|
||||
Reference in new issue
Block a user