From 2b1e04e3c773e79b5bef1e862b95d3f19e3bdf52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=81=A3?= <⁣> Date: Sun, 17 May 2020 15:12:12 +0200 Subject: [PATCH] Fix mistake --- go/tests/capitalize_test/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]) } }