github.com/vlad2095/complete@v1.1.2/match/prefix.go (about)

     1  package match
     2  
     3  import "strings"
     4  
     5  // Prefix is a simple Matcher, if the word is it's prefix, there is a match
     6  // Match returns true if a has the prefix as prefix
     7  func Prefix(long, prefix string) bool {
     8  	return strings.HasPrefix(long, prefix)
     9  }