Skip to content
Related Articles

Related Articles

strings.ToUpperSpecial() Function in Golang With Examples

View Discussion
Improve Article
Save Article
  • Last Updated : 19 May, 2020

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:




// 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"))
}


Output:

HELLO, GEEKS

Example 2:




// 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"))
}


Output:

COMPUTER PORTAL
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!