mirror of
https://github.com/samber/lo.git
synced 2025-09-27 04:15:58 +08:00
chore: lint 💄
This commit is contained in:
@@ -1,13 +1,14 @@
|
|||||||
package lo
|
package lo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/samber/lo/internal/rand"
|
|
||||||
"math"
|
"math"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
|
"github.com/samber/lo/internal/rand"
|
||||||
|
|
||||||
"golang.org/x/text/cases"
|
"golang.org/x/text/cases"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
)
|
)
|
||||||
@@ -108,7 +109,7 @@ func Substring[T ~string](str T, offset int, length uint) T {
|
|||||||
length = uint(size - offset)
|
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,
|
// 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