-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
Labels
Type: DuplicateAnother item already exists for this topicAnother item already exists for this topic
Description
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)
The great Problem is trim()!
What is wrong here?
Thanks!
Metadata
Metadata
Assignees
Labels
Type: DuplicateAnother item already exists for this topicAnother item already exists for this topic