diff options
Diffstat (limited to 'src/runtime/string.go')
| -rw-r--r-- | src/runtime/string.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/string.go b/src/runtime/string.go index a00976be59..7ac3e66a3a 100644 --- a/src/runtime/string.go +++ b/src/runtime/string.go @@ -345,6 +345,10 @@ func hasPrefix(s, prefix string) bool { return len(s) >= len(prefix) && s[:len(prefix)] == prefix } +func hasSuffix(s, suffix string) bool { + return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix +} + const ( maxUint64 = ^uint64(0) maxInt64 = int64(maxUint64 >> 1) |
