mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-28 09:47:31 +02:00
ArduinoJson is now a header-only library (issue #199)
This commit is contained in:
@ -20,7 +20,13 @@ class StaticStringBuilder : public Print {
|
||||
buffer[0] = '\0';
|
||||
}
|
||||
|
||||
virtual size_t write(uint8_t c);
|
||||
virtual size_t write(uint8_t c) {
|
||||
if (length >= capacity) return 0;
|
||||
|
||||
buffer[length++] = c;
|
||||
buffer[length] = '\0';
|
||||
return 1;
|
||||
}
|
||||
|
||||
private:
|
||||
char *buffer;
|
||||
|
Reference in New Issue
Block a user