From: Ramazan AYYILDIZ Date: Tue, 31 Oct 2017 10:19:48 +0000 (+0100) Subject: strings: add examples for specialCase X-Git-Tag: go1.10beta1~508 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=bc98cea9418b8d3bec037ac16a46639576af9c06;p=gostls13.git strings: add examples for specialCase Change-Id: Ifa0384722dd879af7f5edb7b7aaac5ede3cff46d Reviewed-on: https://go-review.googlesource.com/74690 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/strings/example_test.go b/src/strings/example_test.go index ba67458d1f..f7a78b4385 100644 --- a/src/strings/example_test.go +++ b/src/strings/example_test.go @@ -249,6 +249,12 @@ func ExampleToTitle() { // ХЛЕБ } +func ExampleToTitleSpecial() { + fmt.Println(strings.ToTitleSpecial(unicode.TurkishCase, "dünyanın ilk borsa yapısı Aizonai kabul edilir")) + // Output: + // DÜNYANIN İLK BORSA YAPISI AİZONAİ KABUL EDİLİR +} + func ExampleMap() { rot13 := func(r rune) rune { switch { @@ -274,11 +280,21 @@ func ExampleToUpper() { // Output: GOPHER } +func ExampleToUpperSpecial() { + fmt.Println(strings.ToUpperSpecial(unicode.TurkishCase, "örnek iş")) + // Output: ÖRNEK İŞ +} + func ExampleToLower() { fmt.Println(strings.ToLower("Gopher")) // Output: gopher } +func ExampleToLowerSpecial() { + fmt.Println(strings.ToLowerSpecial(unicode.TurkishCase, "Önnek İş")) + // Output: önnek iş +} + func ExampleTrim() { fmt.Print(strings.Trim("¡¡¡Hello, Gophers!!!", "!¡")) // Output: Hello, Gophers