You could probably just have this one const char *const on both inputs, then just call this one from the std::string version, right?

Also, I agree with @t-nelson regarding the readability of the code - the missing return looks wrong (though ofc there's nothing wrong with it) and it takes a while to see that the code will always return.  A comment would fix this concern if you feel this is the most efficient code to have in place.