You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bonzai/filt/filt_test.go

20 lines
325 B
Go

// Copyright 2022 Robert S. Muhlestein.
// SPDX-License-Identifier: Apache-2.0
package filt_test
import (
"fmt"
"github.com/rwxrob/bonzai/filt"
)
func ExampleHasPrefix() {
set := []string{
"one", "two", "three", "four", "five", "six", "seven",
}
fmt.Println(filt.HasPrefix(set, "t"))
// Output:
// [two three]
}