mirror of
https://github.com/samber/lo.git
synced 2025-09-26 20:11:13 +08:00
chore: lint 💄
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
package lo
|
||||
|
||||
import (
|
||||
"github.com/samber/lo/internal/rand"
|
||||
"math"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/samber/lo/internal/rand"
|
||||
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
)
|
||||
@@ -108,7 +109,7 @@ func Substring[T ~string](str T, offset int, length uint) T {
|
||||
length = uint(size - offset)
|
||||
}
|
||||
|
||||
return T(strings.Replace(string(rs[offset:offset+int(length)]), "\x00", "", -1))
|
||||
return T(strings.ReplaceAll(string(rs[offset:offset+int(length)]), "\x00", ""))
|
||||
}
|
||||
|
||||
// ChunkString returns an array of strings split into groups the length of size. If array can't be split evenly,
|
||||
|
Reference in New Issue
Block a user