當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


GO ToUpperSpecial用法及代碼示例

GO語言"strings"包中"ToUpperSpecial"函數的用法及代碼示例。

用法:

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

ToUpperSpecial 返回字符串 s 的副本,其中所有 Unicode 字母使用 c 指定的大小寫映射映射到它們的大寫。

例子:

package main

import (
	"fmt"
	"strings"
	"unicode"
)

func main() {
	fmt.Println(strings.ToUpperSpecial(unicode.TurkishCase, "örnek iş"))
}

輸出:

ÖRNEK İŞ

相關用法


注:本文由純淨天空篩選整理自golang.google.cn大神的英文原創作品 ToUpperSpecial。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。