golang中字符串操作strings.ToUpper
package main
import (
"fmt"
"strings"
)
//golang字符串操作
func main(){
s := "hello world hello world"
//str := "wo"
//var s = []string{"11","22","33"}
//将s中的所有字符修改为其大写格式。对于非ASCII字符,它的大写格式需要查表转换
ret := strings.ToUpper(s)
fmt.Println(ret) //HELLO WORLD HELLO WORLD
}