strings.EqualFold
忽略大小写的比较,返回bool
package main import ( "fmt" "strings" ) func main() { fmt.Println(strings.EqualFold("GoLang", "golang")) fmt.Println(strings.EqualFold("golang", "GoLang")) }
strings.EqualFold
忽略大小写的比较,返回bool
package main import ( "fmt" "strings" ) func main() { fmt.Println(strings.EqualFold("GoLang", "golang")) fmt.Println(strings.EqualFold("golang", "GoLang")) }