Skip to content

Instantly share code, notes, and snippets.

@xvbnm48
Last active March 16, 2024 14:09
Show Gist options
  • Save xvbnm48/c67cc06475325cec23e6a8cce48c73a1 to your computer and use it in GitHub Desktop.
Save xvbnm48/c67cc06475325cec23e6a8cce48c73a1 to your computer and use it in GitHub Desktop.
strings contains any
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Println(strings.ContainsAny("hira dazzle", "ale"))
// return true karena 'ale' ada di dalam 'hira dazzle' walau tidak berurutan
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment