Last active
March 16, 2024 14:09
-
-
Save xvbnm48/c67cc06475325cec23e6a8cce48c73a1 to your computer and use it in GitHub Desktop.
strings contains any
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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