strings.HasPrefix(s string, prefix string) bool:判断字符串s是否以prefix开头 。de13
strings.HasSuffix(s string, suffix string) bool:判断字符串s是否以suffix结尾。ab9cb3
strings.Index(s string, str string) int:判断str在s中首次出现的位置,如果没有出现,则返回-1
cee9
strings.LastIndex(s string, str string) int:判断str在s中最后出现的位置,如果没有出现,则返回-17d8be
strings.Replace(str string, old string, new string, n int):字符串替换ab9cb3
strings.Count(str string, substr string)int:字符串计数7d8be
strings.Repeat(str string, count int)string:重复count次strwww.9
标签:string,int,学习,字符串,prefix,Stings,str,Go,strings From: https://www.cnblogs.com/gtea/p/16610122.html