String to std::string and char const*?


#1

I’m introducing the usage of String objects in a code base that deals primarily in std::string and char const*. What is the most correct way to pass a String object where either of these types are expected? Currently I am using String::toRawUtf8().

Should I write a free conversion function template to abstract this or something? Jules work your magic!


#2

Well, that sounds like String::toStdString and String::toRawUTF8 to me!