import (
"fmt"
"strings"
)
func main() {
fmt.Println(strings.Contains("widuu", "wi")) //true
fmt.Println(strings.Contains("wi", "widuu")) //false
}
字符串是否包含,示例代码有创意
2023-12-18 12:51:57
import (
"fmt"
"strings"
)
func main() {
fmt.Println(strings.Contains("widuu", "wi")) //true
fmt.Println(strings.Contains("wi", "widuu")) //false
}
字符串是否包含,示例代码有创意