github.com/jordan-bonecutter/can-go@v0.0.0-20230901155856-d83995b18e50/internal/identifiers/case.go (about) 1 package identifiers 2 3 import "unicode" 4 5 func IsCamelCase(s string) bool { 6 i := 0 7 for _, r := range s { 8 if unicode.IsDigit(r) { 9 continue 10 } 11 if i == 0 && !unicode.IsUpper(r) || !IsAlphaChar(r) && !IsNumChar(r) { 12 return false 13 } 14 i++ 15 } 16 return true 17 }