| author | |
| committer | |
| log | 88d57917b7df1f0c59d27a923bd564f5d21f7846 |
| tree | b5ac0fd5e5f995ffbd720fa15a71181a3dee8b44 |
| parent | 07cd488d4216742b2a29af95e330728a0f83627f |
| signature |
1 files changed, 4 insertions(+), 4 deletions(-)
lib/std/ascii.zig+4-4| ... | ... | @@ -135,10 +135,10 @@ pub fn isPrint(c: u8) bool { |
| 135 | 135 | |
| 136 | 136 | /// Returns whether this character is included in `whitespace`. |
| 137 | 137 | pub fn isWhitespace(c: u8) bool { |
| 138 | return for (whitespace) |other| { | |
| 139 | if (c == other) | |
| 140 | break true; | |
| 141 | } else false; | |
| 138 | return switch (c) { | |
| 139 | ' ', '\t'...'\r' => true, | |
| 140 | else => false, | |
| 141 | }; | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /// Whitespace for general use. |