package main
import (
"fmt"
"strings"
)
func main() {
value :=
"bird"
// Finds the letter "i" index.
// ... No "a" is found in the string.
result1 := strings.IndexAny(value,
"ai")
fmt.Println(
"RESULT1:", result1, value[result1:result1+1])
// Find index of first character in the set of chars.
result2 := strings.IndexAny(value,
"x?rd_")
fmt.Println(
"RESULT2:", result2, value[result2:result2+1])
}
RESULT1: 1 i
RESULT2: 2 r