Files
ArduinoJson/JsonGenerator/EscapedString.h
Benoit Blanchon 85ffb83aa6 Fixed failing test
2014-07-31 18:50:01 +02:00

35 lines
617 B
C++

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