Commit 5703ab1d0c

Rohlem <rohlemF@gmail.com>
2019-03-29 12:07:22
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; ^ ```
1 parent a824a8c
Changed files (1)
std/ascii.zig
@@ -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;
     }