18 lines
299 B
Go
18 lines
299 B
Go
package strings
|
|
|
|
import "strings"
|
|
|
|
type Namespace struct{}
|
|
|
|
func New() *Namespace {
|
|
return &Namespace{}
|
|
}
|
|
|
|
func (ns *Namespace) HasPrefix(s, prefix string) bool {
|
|
return strings.HasPrefix(s, prefix)
|
|
}
|
|
|
|
func (ns *Namespace) HasSuffix(s, suffix string) bool {
|
|
return strings.HasSuffix(s, suffix)
|
|
}
|