We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddca5c6 commit 5b9faf6Copy full SHA for 5b9faf6
api/WCharacter.h
@@ -70,7 +70,7 @@ inline bool isAscii(int c)
70
// Checks for a blank character, that is, a space or a tab.
71
inline bool isWhitespace(int c)
72
{
73
- return ( isblank (c) == 0 ? false : true);
+ return ( c == '\t' || c == ' ');
74
}
75
76
@@ -98,7 +98,7 @@ inline bool isGraph(int c)
98
// Checks for a lower-case character.
99
inline bool isLowerCase(int c)
100
101
- return (islower (c) == 0 ? false : true);
+ return ( c >= 'a' && c <= 'z' );
102
103
104
@@ -113,7 +113,7 @@ inline bool isPrintable(int c)
113
// or an alphanumeric character.
114
inline bool isPunct(int c)
115
116
- return ( ispunct (c) == 0 ? false : true);
+ return ( isPrintable(c) && !isSpace(c) && !isAlphaNumeric(c) );
117
118
119
0 commit comments