goacc/pkg/store/helper.go
2022-07-10 01:10:31 +02:00

11 lines
264 B
Go

// Copyright (C) 2022 Marius Schellenberger
package store
// Parts taken from strings.TrimPrefix
func hasTrimPrefix(s, prefix string) (string, bool) {
if len(s) >= len(prefix) && s[0:len(prefix)] == prefix {
return s[len(prefix):], true
}
return s, false
}