04.5.3 关于字符串处理的包
package main import ( "fmt" s "strings" "unicode" ) var f = fmt.Printf
unc main() { upper := s.ToUpper("Hello there!") f("To Upper: %s\n", upper) f("To Lower: %s\n", s.ToLower("Hello THERE")) f("%s\n", s.Title("tHis wiLL be A title!")) f("EqualFold: %v\n", s.EqualFold("Mihalis", "MIHAlis")) f("EqualFold: %v\n", s.EqualFold("Mihalis", "MIHAli"))
Last updated