- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TITLE (0.13 sec)
-
src/bytes/example_test.go
} func ExampleSplitAfterN() { fmt.Printf("%q\n", bytes.SplitAfterN([]byte("a,b,c"), []byte(","), 2)) // Output: ["a," "b,c"] } func ExampleTitle() { fmt.Printf("%s", bytes.Title([]byte("her royal highness"))) // Output: Her Royal Highness } func ExampleToTitle() { fmt.Printf("%s\n", bytes.ToTitle([]byte("loud noises"))) fmt.Printf("%s\n", bytes.ToTitle([]byte("хлеб"))) // Output:
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
return unicode.IsSpace(r) } // Title treats s as UTF-8-encoded bytes and returns a copy with all Unicode letters that begin // words mapped to their title case. // // Deprecated: The rule Title uses for word boundaries does not handle Unicode // punctuation properly. Use golang.org/x/text/cases instead. func Title(s []byte) []byte { // Use a closure here to remember state.
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
{"unicode \xe2\x80\xa8 line separator", "Unicode \xe2\x80\xa8 Line Separator"}, } func TestTitle(t *testing.T) { for _, tt := range TitleTests { if s := string(Title([]byte(tt.in))); s != tt.out { t.Errorf("Title(%q) = %q, want %q", tt.in, s, tt.out) } } } var ToTitleTests = []TitleTest{ {"", ""}, {"a", "A"}, {" aaa aaa aaa ", " AAA AAA AAA "},
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)