fix std.ascii type error and inverted logic

previously:
```
...\lib\zig\std\ascii.zig:203:20: error: unable to perform binary not operation on type 'comptime_int'
        return c | ~0b00100000;
                   ^
```
This commit is contained in:
Rohlem 2019-03-29 12:07:22 +01:00 committed by Andrew Kelley
parent a824a8c687
commit 5703ab1d0c

View File

@ -200,7 +200,7 @@ pub fn isBlank(c: u8) bool {
pub fn toUpper(c: u8) u8 {
if (isLower(c)) {
return c | ~0b00100000;
return c & 0b11011111;
} else {
return c;
}
@ -208,7 +208,7 @@ pub fn toUpper(c: u8) u8 {
pub fn toLower(c: u8) u8 {
if (isUpper(c)) {
return c & 0b00100000;
return c | 0b00100000;
} else {
return c;
}