golang中的字符串操作strings.Contains
package main
import (
"fmt"
"strings"
)
//golang字符串操作
func main(){
s := "hello world hello world"
str := "wo"
//判断字符串s中是否包含个子串str。包含或者str为空则返回true
index := strings.Contains(s,str)
fmt.Println(index) //true
}