Update strings case convertors to be unicode compliant

This commit is contained in:
gingerBill
2020-05-24 17:50:27 +01:00
parent e42f7008fc
commit f06efffe22
3 changed files with 201 additions and 173 deletions
+2 -1
View File
@@ -105,7 +105,8 @@ is_title :: proc(r: rune) -> bool {
return is_upper(r) && is_lower(r);
}
is_white_space :: proc(r: rune) -> bool {
is_white_space :: is_space;
is_space :: proc(r: rune) -> bool {
c := i32(r);
p := binary_search(c, space_ranges[:], len(space_ranges)/2, 2);
if p >= 0 && space_ranges[p] <= c && c <= space_ranges[p+1] {