Skip to content

Commit d91b19f

Browse files
committed
chore: lint 💄
1 parent 964a3c7 commit d91b19f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

string.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package lo
22

33
import (
4-
"github.com/samber/lo/internal/rand"
54
"math"
65
"regexp"
76
"strings"
87
"unicode"
98
"unicode/utf8"
109

10+
"github.com/samber/lo/internal/rand"
11+
1112
"golang.org/x/text/cases"
1213
"golang.org/x/text/language"
1314
)
@@ -108,7 +109,7 @@ func Substring[T ~string](str T, offset int, length uint) T {
108109
length = uint(size - offset)
109110
}
110111

111-
return T(strings.Replace(string(rs[offset:offset+int(length)]), "\x00", "", -1))
112+
return T(strings.ReplaceAll(string(rs[offset:offset+int(length)]), "\x00", ""))
112113
}
113114

114115
// ChunkString returns an array of strings split into groups the length of size. If array can't be split evenly,

0 commit comments

Comments
 (0)