-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
Good Morning facchinm
Issue #7039 not a BUG?
Fail!
the isWhitespace() function bring Char 9円 (TAB) and 32円 (SPACE) as true
the isSpace() bring 9円 10円 11円 12円 13円 32円 as true
the ctype.h have isBlank() function,
Implementation?
Highligth isBlank() NONE / but isBlank() gives 9円 and 32円 as true
Also repair:
Arduino isWhitespace() -> ctype isspace()
Ardunio isSpace() -> ctype isblank()
facchinm
This issue tracker is only to be used to report bugs or feature requests. This topic is more appropriate for the Arduino Forum. I'm sure we'll be able to help you with your problem over there.
in https://www.arduino.cc/reference/en/language/functions/characters/isspace/
isSpace() true by ASCII 9 and 32 (DEC).
in https://www.arduino.cc/reference/en/language/functions/characters/iswhitespace/
isWhitespace() true then ASCII-Code 9, 10, 11, 12, 13 and 32 (DEC)
void setup()
{
Serial.begin(9600); // Serial Init
while (!Serial); // Wartet auf seriellen Monitor
}
void loop()
{
for (int thisChar = 0; thisChar < 128; thisChar++)
{
Serial.print("Char: \'");
Serial.write(thisChar);
Serial.print("\' ASCII: ");
Serial.print(thisChar);
Serial.print(" ");
if (isSpace(thisChar)) { Serial.print(", isSpace()"); }
if (isWhitespace(thisChar)) { Serial.print(", isWhitespace()"); }
Serial.println(".");
}
while(1);
}
This Code maen: isSpace(thisChar); is true by 9, 10,11, 12 13 32 (DEC) and maen isWhitespace(thisChar) is true by 9 and 32 (DEC)