What is the R used for in a const char definition?

KrisKasprzak

Well-known member
All,

I have working code that creates a web page and displays data via AJAX. No issues but a question?

in my we page char definition there is and R character. Anyone know what it's used for?


Code:
const char PAGE_MAIN[] PROGMEM = R"=====(

<!DOCTYPE html>
<html lang="en" class="js-focus-visible">
<title>PATRIOT RACING</title>


.. a bunch of stuff in here....


</script>
</body>
</html>



)=====";
 
All thanks for the replies. The R designation is a great way for one to "write at will" when creating huge chars.
 
All thanks for the replies. The R designation is a great way for one to "write at will" when creating huge chars.

I tend to prefer string constant gluing (which unlike R"..." is part of the standard C and C++ languages):

Code:
const char message[] = ""
   "This is line1\n"
   "This is line2\n"
   "This is line3\n";
 
Back
Top