package main
import (
"fmt"
"strings"
)
// isTwoWordsInString checks if both words are present in the string
func isTwoWordsInString(s, w1, w2 string) bool {
return strings.Contains(s, w1) && strings.Contains(s, w2)
}
func main() {
s := "Far out in the uncharted area of the end of the Western Spiral arm of the Galaxy"
w1 := "uncharted"
w2 := "Galaxy"
result := isTwoWordsInString(s, w1, w2)
fmt.Println(result)
}
/*
run:
true
*/