- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ToLower (0.19 sec)
-
src/bytes/example_test.go
func ExampleToLower() { fmt.Printf("%s", bytes.ToLower([]byte("Gopher"))) // Output: gopher } func ExampleToLowerSpecial() { str := []byte("AHOJ VÝVOJÁRİ GOLANG") totitle := bytes.ToLowerSpecial(unicode.AzeriCase, str) fmt.Println("Original : " + string(str)) fmt.Println("ToLower : " + string(totitle)) // Output: // Original : AHOJ VÝVOJÁRİ GOLANG // ToLower : ahoj vývojári golang }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Mar 04 15:54:40 GMT 2024 - 15K bytes - Viewed (1) -
src/bytes/bytes.go
c := s[i] if 'a' <= c && c <= 'z' { c -= 'a' - 'A' } b[i] = c } return b } return Map(unicode.ToUpper, s) } // ToLower returns a copy of the byte slice s with all Unicode letters mapped to // their lower case. func ToLower(s []byte) []byte { isASCII, hasUpper := true, false for i := 0; i < len(s); i++ { c := s[i] if c >= utf8.RuneSelf { isASCII = false break }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
src/bytes/bytes_test.go
t.Errorf("invalidRune: expected %q got %q", expect, m) } } func TestToUpper(t *testing.T) { runStringTests(t, ToUpper, "ToUpper", upperTests) } func TestToLower(t *testing.T) { runStringTests(t, ToLower, "ToLower", lowerTests) } func BenchmarkToUpper(b *testing.B) { for _, tc := range upperTests { tin := []byte(tc.in) b.Run(tc.in, func(b *testing.B) { for i := 0; i < b.N; i++ {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0)