1、基本介绍
strings包实现了用于操作字符的简单函数
。
2、EqualFold函数
3、HasPrefix和HasSuffix(前后缀)
ret := strings.HasPrefix("index.html", "ind")
fmt.Println(ret) // true
4、Contains系列
5、Count(子串数)
6、Index系列
7、LastIndex系列
8、Title函数
9、To系列
10、Repeat和Replace函数
11、Join函数
12、Trim系列
13、Fields函数
14、Split系列
15、Reader类型
使用NewReader函数从字符串获取一个Reader读取的流对象
,然后就可以根据这个对象进行相关方法的调用。