go语言strings包

中文官方文档

package main

import (
	"fmt"
	"strings"
)

func main() {
	var s string
	fmt.Scanf("%v", &s)
	// func Count(s, sep string) int 返回s中包含sep的个数
	e := strings.Count(s, "e") //如果输入eee,则输出3
	// func ToLower(s string) string 将所有字母转换为小写
	fmt.Println(strings.ToLower("Gopher")) //输出gopher
}
原文地址:https://www.cnblogs.com/zheng-chuang/p/6061420.html