strings.ToUpperSpecial() Function in Golang With Examples

strings.ToUpperSpecial() Function in Golang is used to returns a copy of the string s with all Unicode letters mapped to their upper case using the case mapping specified by c.

Syntax:

func ToUpperSpecial(c unicode.SpecialCase, s string) string

Here, c is the case mapping and s is the specified string.

Example 1:

filter_none

edit
close

play_arrow

link
brightness_4
code

// Golang program to illustrate
// the strings.ToUpperSpecial Function
package main
  
import (
    "fmt"
    "strings"
    "unicode"
)
  
func main() {
  
    // using the function
    fmt.Println(strings.ToUpperSpecial(unicode.TurkishCase, "Hello, Geeks"))
}

chevron_right


Output:

HELLO, GEEKS

Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

// Golang program to illustrate
// the strings.ToUpperSpecial Function
package main
  
import (
    "fmt"
    "strings"
    "unicode"
)
  
func main() {
  
    // using the function
    fmt.Println(strings.ToUpperSpecial(unicode.TurkishCase, "Computer Portal"))
}

chevron_right


Output:

COMPUTER PORTAL
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.