转驼峰兼容字符串为空
This commit is contained in:
parent
43bd254dde
commit
a4f6d5af95
@ -54,6 +54,9 @@ func Md5(str string) string {
|
|||||||
//
|
//
|
||||||
// Date : 4:58 下午 2021/10/25
|
// Date : 4:58 下午 2021/10/25
|
||||||
func SnakeCaseToCamel(str string) string {
|
func SnakeCaseToCamel(str string) string {
|
||||||
|
if len(str) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
builder := strings.Builder{}
|
builder := strings.Builder{}
|
||||||
index := 0
|
index := 0
|
||||||
if str[0] >= 'a' && str[0] <= 'z' {
|
if str[0] >= 'a' && str[0] <= 'z' {
|
||||||
|
Loading…
Reference in New Issue
Block a user