- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ExampleIndex (0.14 sec)
-
src/slices/example_test.go
sn, err := strconv.ParseInt(s, 0, 64) if err != nil { return false } return n == int(sn) }) fmt.Println(equal) // Output: // true } func ExampleIndex() { numbers := []int{0, 42, 8} fmt.Println(slices.Index(numbers, 8)) fmt.Println(slices.Index(numbers, 7)) // Output: // 2 // -1 } func ExampleIndexFunc() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 8.1K bytes - Viewed (0) -
src/strings/example_test.go
fmt.Println(strings.HasSuffix("Amigo", "Ami")) fmt.Println(strings.HasSuffix("Amigo", "")) // Output: // true // false // false // true } func ExampleIndex() { fmt.Println(strings.Index("chicken", "ken")) fmt.Println(strings.Index("chicken", "dmr")) // Output: // 4 // -1 } func ExampleIndexFunc() { f := func(c rune) bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 22:05:38 UTC 2023 - 10.7K bytes - Viewed (0)