Files
ArduinoJson/JsonGenerator/EscapedString.h

35 lines
617 B
C
Raw Normal View History

2014-07-07 13:38:35 +02:00
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
#pragma once
#include "Print.h"
2014-07-31 18:50:01 +02:00
#include <string.h> // for strcmp
2014-07-07 13:38:35 +02:00
namespace ArduinoJson
2014-07-07 13:38:35 +02:00
{
namespace Internals
{
class EscapedString
{
public:
2014-07-07 13:38:35 +02:00
void set(const char* s)
{
rawString = s;
}
2014-07-07 13:38:35 +02:00
size_t printTo(Print&) const;
2014-07-31 18:50:01 +02:00
bool equals(char const* s)
{
return strcmp(s, rawString) == 0;
}
2014-07-07 13:38:35 +02:00
private:
const char* rawString;
};
}
}