I have a const char and a const wchar_t. My function below works with the char. What's the simplest/most efficient way to write a function that can easily handle both char and wchar_t?
const char* asciiChar = "this is an ascii string";
const wchar_t* unicodeChar = L"this is a unicode string";
std::string replaceSubstring(const char* find, const char* asciiChar, const char* replace)
{
std::string const text(str);
std::regex const reg(find);
std::string const newStr = std::regex_replace(text, reg, replace);
return newStr;
}