#includevoid setup() { Serial.begin(9600); AString myString = "Hello World"; Serial.print("Length of string: "); Serial.println(myString.size()); } void loop() { // do nothing }
#includeThe AString class is part of the AUnit library, which is a collection of libraries for unit testing in Arduino.void setup() { Serial.begin(9600); } void loop() { if (Serial.available() > 0) { AString myString = Serial.readString(); if (myString.size() > 10) { Serial.println("String is too long."); } } }