Skip to content
Myr

Limit search scope of uppercase letter

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 931c78a · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:src/algo/algo.go+4 added-1 removed
261 unmodified lines
262 }263 // We may need to search for the uppercase letter again. We don't have to264 // consider normalization as we can be sure that this is an ASCII string.265 if !caseSensitive && b >= 'a' && b <= 'z' {266 if idx > 0 {267 byteArray = byteArray[:idx]268 }269 uidx := bytes.IndexByte(byteArray, b-32)267 if idx < 0 || uidx >= 0 && uidx < idx {270 if uidx >= 0 {271 idx = uidx272 }273 }274 if idx < 0 {
558 unmodified lines