Using F() with R"()" for saving raw strings to flash
Posted: Thu Feb 22, 2018 1:36 pm
Anybody know how to use F() or PSTR() with R"()" for multiline raw strings?
i have some html that i use in my esp project that i have saved globaly with PROGMEM
However i also have alot og inline html that i want to save within functions
I have tried using
But this gives all sorts of compile errors when i break the strings in to lines in the source code.
The code below works fine but makes the html difficult to read:
anybody know how to use F() with multiline RAW Strings using R"()"?
i have some html that i use in my esp project that i have saved globaly with PROGMEM
Code: Select all
const char FPSTR_html_gui[] PROGMEM = R"(
<div>Some HTML Here</div>
)";
However i also have alot og inline html that i want to save within functions
I have tried using
Code: Select all
String html = "";
html += F(R"(
<div class="row">
<div class="col-sm-12">
text here
</div>
</div>
)");
But this gives all sorts of compile errors when i break the strings in to lines in the source code.
The code below works fine but makes the html difficult to read:
Code: Select all
String html = "";
html += F(R"(<div class="row"><div class="col-sm-12">text here</div></div>)");
anybody know how to use F() with multiline RAW Strings using R"()"?