11 lines
264 B
Go
11 lines
264 B
Go
// Copyright (C) 2019 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
|
|
}
|