mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-05 04:16:15 +02:00
util/strutil: remove duplicate isASCII declaration (#18522)
Signed-off-by: Toni Cárdenas <toni.cardenasvargas@grafana.com>
This commit is contained in:
parent
98809e40c6
commit
2ad75b0ef0
@ -52,16 +52,6 @@ func (m *JaroWinklerMatcher) Score(s string) float64 {
|
||||
return jaroWinklerRunes(m.termRunes, []rune(s))
|
||||
}
|
||||
|
||||
// isASCII reports whether s contains only ASCII characters.
|
||||
func isASCII(s string) bool {
|
||||
for i := range len(s) {
|
||||
if s[i] >= 0x80 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// jaroWinklerString implements the Jaro-Winkler algorithm directly on ASCII
|
||||
// strings, avoiding any []rune conversion.
|
||||
func jaroWinklerString(s1, s2 string) float64 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user