I need to implement a string array, like:
String[] txt = {"some text1", "some text2", "some text3", "some text4"};
The standard char[] doesn't suit me. How can I use string Array or List in Arduino IDE for ESP32?
1 Answer
You're free to use all STL facilities, including an array of strings. Standard caveats apply (dynamic RAM allocation from heap, STL uses lots of Flash for code, etc)
#include <string>
#include <array>
std::array<std::string> my_array = {"text1", "text2"};