Just curious to findout: why aren\'t there standard functions like startswith, endswith, etc as part of the standard libraries in the Go programming language?
The strings package contains HasPrefix and HasSuffix.
import "strings" startsWith := strings.HasPrefix("prefix", "pre") // true endsWith := strings.HasSuffix("suffix", "fix") // true
play.golang.org