summaryrefslogtreecommitdiff
path: root/vendor/github.com/huandu/xstrings/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/huandu/xstrings/common.go')
-rw-r--r--vendor/github.com/huandu/xstrings/common.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/vendor/github.com/huandu/xstrings/common.go b/vendor/github.com/huandu/xstrings/common.go
deleted file mode 100644
index f427cc84e..000000000
--- a/vendor/github.com/huandu/xstrings/common.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2015 Huan Du. All rights reserved.
-// Licensed under the MIT license that can be found in the LICENSE file.
-
-package xstrings
-
-const bufferMaxInitGrowSize = 2048
-
-// Lazy initialize a buffer.
-func allocBuffer(orig, cur string) *stringBuilder {
- output := &stringBuilder{}
- maxSize := len(orig) * 4
-
- // Avoid to reserve too much memory at once.
- if maxSize > bufferMaxInitGrowSize {
- maxSize = bufferMaxInitGrowSize
- }
-
- output.Grow(maxSize)
- output.WriteString(orig[:len(orig)-len(cur)])
- return output
-}