mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Don't count single quote ' as garbage (#1801)
Also copy the "blank space" (space or tab) vs "whitespace" (space, tab, or newline) convention from `<ctype.h>`
This commit is contained in:
10
src/util.cpp
10
src/util.cpp
@@ -5,12 +5,16 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
bool isWhitespace(int c) {
|
||||
bool isNewline(int c) {
|
||||
return c == '\r' || c == '\n';
|
||||
}
|
||||
|
||||
bool isBlankSpace(int c) {
|
||||
return c == ' ' || c == '\t';
|
||||
}
|
||||
|
||||
bool isNewline(int c) {
|
||||
return c == '\r' || c == '\n';
|
||||
bool isWhitespace(int c) {
|
||||
return isBlankSpace(c) || isNewline(c);
|
||||
}
|
||||
|
||||
bool isPrintable(int c) {
|
||||
|
||||
Reference in New Issue
Block a user