mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			437 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			437 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Arduino JSON library
 | |
|  * Benoit Blanchon 2014 - MIT License
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| class StringBuilder
 | |
| {
 | |
| public:
 | |
|     StringBuilder(char* buf, size_t size)
 | |
|         : buffer(buf), capacity(size-1), length(0)
 | |
|     {
 | |
|         buffer[0] = 0;
 | |
|     }
 | |
| 
 | |
|     void append(double);
 | |
|     void append(const char* s);
 | |
|     void appendEscaped(const char* s);
 | |
| 
 | |
| private:
 | |
|     char* buffer;
 | |
|     size_t capacity;
 | |
|     size_t length;
 | |
| };
 | |
| 
 |