mirror of
				https://github.com/bblanchon/ArduinoJson.git
				synced 2025-11-04 08:31:36 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			297 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			297 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * 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;
 | 
						|
} |