|
|
|
@ -2,6 +2,7 @@ package stringx
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"errors"
|
|
|
|
|
"unicode"
|
|
|
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/core/lang"
|
|
|
|
|
)
|
|
|
|
@ -168,6 +169,15 @@ func TakeWithPriority(fns ...func() string) string {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ToCamelCase returns the string that converts the first letter to lowercase.
|
|
|
|
|
func ToCamelCase(s string) string {
|
|
|
|
|
for i, v := range s {
|
|
|
|
|
return string(unicode.ToLower(v)) + s[i+1:]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Union merges the strings in first and second.
|
|
|
|
|
func Union(first, second []string) []string {
|
|
|
|
|
set := make(map[string]lang.PlaceholderType)
|
|
|
|
|