to be
a problem slover

case insensitive string compare in go

package main

import (
    "fmt"
    "strings"
)

func main() {
    res := strings.EqualFold("abc", "AbC")
    fmt.Println(res)

    res = strings.EqualFold("abc", "AbCd")
    fmt.Println(res)
}
// output:
// true
// false
赞(3) 打赏
欢迎转载,注明出处:刘世明的博客 » case insensitive string compare in go

评论 1

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.com/kz/register?ref=K8NFKJBQ

    Binance注册1周前 (03-20)回复

觉得文章有用就打赏一下作者

支付宝扫一扫打赏

微信扫一扫打赏