mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 21:12:25 +02:00
35 lines
617 B
C++
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;
|
|
};
|
|
}
|
|
} |