Skip to content

Commit bc98cea

Browse files
rayyildizianlancetaylor
authored andcommitted
strings: add examples for specialCase
Change-Id: Ifa0384722dd879af7f5edb7b7aaac5ede3cff46d Reviewed-on: https://go-review.googlesource.com/74690 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 52cf91a commit bc98cea

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/strings/example_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ func ExampleToTitle() {
249249
// ХЛЕБ
250250
}
251251

252+
func ExampleToTitleSpecial() {
253+
fmt.Println(strings.ToTitleSpecial(unicode.TurkishCase, "dünyanın ilk borsa yapısı Aizonai kabul edilir"))
254+
// Output:
255+
// DÜNYANIN İLK BORSA YAPISI AİZONAİ KABUL EDİLİR
256+
}
257+
252258
func ExampleMap() {
253259
rot13 := func(r rune) rune {
254260
switch {
@@ -274,11 +280,21 @@ func ExampleToUpper() {
274280
// Output: GOPHER
275281
}
276282

283+
func ExampleToUpperSpecial() {
284+
fmt.Println(strings.ToUpperSpecial(unicode.TurkishCase, "örnek iş"))
285+
// Output: ÖRNEK İŞ
286+
}
287+
277288
func ExampleToLower() {
278289
fmt.Println(strings.ToLower("Gopher"))
279290
// Output: gopher
280291
}
281292

293+
func ExampleToLowerSpecial() {
294+
fmt.Println(strings.ToLowerSpecial(unicode.TurkishCase, "Önnek İş"))
295+
// Output: önnek iş
296+
}
297+
282298
func ExampleTrim() {
283299
fmt.Print(strings.Trim("¡¡¡Hello, Gophers!!!", "!¡"))
284300
// Output: Hello, Gophers

0 commit comments

Comments
 (0)