mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-16 12:02:14 +02:00
Moved files into Internals/ and Arduino/
This commit is contained in:
17
srcs/Internals/StringBuilder.cpp
Normal file
17
srcs/Internals/StringBuilder.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Arduino JSON library
|
||||
* Benoit Blanchon 2014 - MIT License
|
||||
*/
|
||||
|
||||
#include "StringBuilder.h"
|
||||
|
||||
using namespace ArduinoJson::Internals;
|
||||
|
||||
size_t StringBuilder::write(uint8_t c)
|
||||
{
|
||||
if (length >= capacity) return 0;
|
||||
|
||||
buffer[length++] = c;
|
||||
buffer[length] = 0;
|
||||
return 1;
|
||||
}
|
Reference in New Issue
Block a user