mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 13:00:28 +00:00
islower now used the generated tables
This commit is contained in:
committed by
Jeroen van Rijn
parent
b4d70d3c5b
commit
69c04b696a
@@ -75,16 +75,7 @@ is_lower :: proc(r: rune) -> bool #no_bounds_check {
|
||||
if r <= MAX_ASCII {
|
||||
return u32(r)-'a' < 26
|
||||
}
|
||||
c := i32(r)
|
||||
p := binary_search(c, to_upper_ranges[:], len(to_upper_ranges)/3, 3)
|
||||
if p >= 0 && to_upper_ranges[p] <= c && c <= to_upper_ranges[p+1] {
|
||||
return true
|
||||
}
|
||||
p = binary_search(c, to_upper_singlets[:], len(to_upper_singlets)/2, 2)
|
||||
if p >= 0 && c == to_upper_singlets[p] {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return in_range(r, ll_ranges) || in_range(r, other_lowercase_ranges)
|
||||
}
|
||||
|
||||
@(require_results)
|
||||
|
||||
Reference in New Issue
Block a user