Added string deduplication (closes #1303)

This commit is contained in:
Benoit Blanchon
2020-07-21 20:15:31 +02:00
parent 8ef226bcb8
commit 764ff2cd53
31 changed files with 574 additions and 156 deletions

View File

@@ -5,6 +5,7 @@
#pragma once
#include <ArduinoJson/Polyfills/pgmspace.hpp>
#include <ArduinoJson/Strings/FlashStringIterator.hpp>
#include <ArduinoJson/Strings/IsString.hpp>
#include <ArduinoJson/Strings/StoragePolicy.hpp>
@@ -42,6 +43,10 @@ class FlashStringAdapter {
return strlen_P(reinterpret_cast<const char*>(_str));
}
FlashStringIterator begin() const {
return FlashStringIterator(_str);
}
typedef storage_policies::store_by_copy storage_policy;
private: