func toLowerCase(str string) string {
nbs := make([]byte, len([]byte(str)))
for i, v := range []byte(str) {
nv := v
if v >= 65 && v <= 90 {
nv = v + 32
}
nbs[i] = nv
}
return string(nbs)
}
func toLowerCase(str string) string {
nbs := make([]byte, len([]byte(str)))
for i, v := range []byte(str) {
nv := v
if v >= 65 && v <= 90 {
nv = v + 32
}
nbs[i] = nv
}
return string(nbs)
}
本文标题:to lower case
本文链接:https://www.haomeiwen.com/subject/ixtldqtx.html
网友评论