Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Oct 17, 2024
1 parent 00647fa commit 03b75f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/util/stringutil/string_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func matchRune(a, b rune) bool {
func CompileLike2Regexp(str string) string {
patChars, patTypes := CompilePattern(str, '\\')
var result []rune
for i := 0; i < len(patChars); i++ {
for i := range len(patChars) {
switch patTypes[i] {
case PatMatch:
result = append(result, patChars[i])
Expand Down Expand Up @@ -496,7 +496,7 @@ func IsLowerASCII(c byte) bool {
// LowerOneString lowers the ascii characters in a string
func LowerOneString(str []byte) {
strLen := len(str)
for i := 0; i < strLen; i++ {
for i := range strLen {
if IsUpperASCII(str[i]) {
str[i] = toLowerIfAlphaASCII(str[i])
}
Expand Down

0 comments on commit 03b75f2

Please sign in to comment.