We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 887c0f1 commit 6424efdCopy full SHA for 6424efd
modules/util/truncate.go
@@ -6,6 +6,7 @@ package util
6
7
import "unicode/utf8"
8
9
+// SplitStringAtByteN splits a string at byte n accounting for rune boundaries. (Combining characters are not accounted for.)
10
func SplitStringAtByteN(input string, n int) (left, right string) {
11
if len(input) <= n {
12
left = input
0 commit comments