diff --git a/go/tests/capitalize_test/main.go b/go/tests/capitalize_test/main.go index 6501097eb..bcc4b4a0a 100644 --- a/go/tests/capitalize_test/main.go +++ b/go/tests/capitalize_test/main.go @@ -12,12 +12,12 @@ import ( func capitalize(s string) string { r := []rune(strings.ToLower(s)) - if unicode.IsLower(r[0]) { + if unicode.Is(unicode.Latin, r[0]) { r[0] = unicode.ToUpper(r[0]) } for i := 1; i < len(r); i++ { - if !unicode.Is(unicode.ASCII_Hex_Digit, r[i-1]) && unicode.IsLower(r[i]) { + if !unicode.IsDigit(r[i-1]) && !unicode.Is(unicode.Latin, r[i-1]) { r[i] = unicode.ToUpper(r[i]) } }