aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/string.go
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2024-05-15 02:37:41 +0800
committerMichael Knyszek <mknyszek@google.com>2024-05-17 15:41:45 +0000
commit2c635b68fdc8ddf83208ed2ec65eff09a3af58b8 (patch)
tree39afcafd8f4d3e03a68334a53ab38c5dfe53250d /src/runtime/string.go
parentd11e41728515aea6f7def4a279a3a2591fb18650 (diff)
downloadgo-2c635b68fdc8ddf83208ed2ec65eff09a3af58b8.tar.xz
runtime: make use of stringslite.{HasPrefix, HasSuffix}
Change-Id: I7461a892e1591e3bad876f0a718a99e6de2c4659 Reviewed-on: https://go-review.googlesource.com/c/go/+/585435 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/runtime/string.go')
-rw-r--r--src/runtime/string.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/runtime/string.go b/src/runtime/string.go
index 81d1b80e56..d45888b7a8 100644
--- a/src/runtime/string.go
+++ b/src/runtime/string.go
@@ -341,14 +341,6 @@ func gostringn(p *byte, l int) string {
return s
}
-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)