- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for ToTitle (0.05 seconds)
-
src/bytes/bytes.go
c += 'a' - 'A' } b[i] = c } return b } return Map(unicode.ToLower, s) } // ToTitle treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their title case. func ToTitle(s []byte) []byte { return Map(unicode.ToTitle, s) } // ToUpperSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Thu Mar 12 17:56:55 GMT 2026 - 36.3K bytes - Click Count (0) -
src/bytes/bytes_test.go
{"123a456", "123A456"}, {"double-blind", "DOUBLE-BLIND"}, {"ÿøû", "ŸØÛ"}, } func TestToTitle(t *testing.T) { for _, tt := range ToTitleTests { if s := string(ToTitle([]byte(tt.in))); s != tt.out { t.Errorf("ToTitle(%q) = %q, want %q", tt.in, s, tt.out) } } } var EqualFoldTests = []struct { s, t string out bool }{ {"abc", "abc", true}, {"ABcd", "ABcd", true},Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Wed Mar 11 03:07:05 GMT 2026 - 62.9K bytes - Click Count (0)