package mainimport ( "fmt" "strings")func testContains() { ips := "你好世界,hello world" //判断串是否包含某个字符串 result := strings.Contains(ips,"hello") fmt.Println(result)}func main() { testContains()} 输出: true