That's not a good idea, anyway, as you would throw away any type checking for the function. That's one reason why overloading exists as it does in the first place. Don't try to make a function a "Swiss Army Knife"...it will just come back to cut you later on. One function, one task, one signature...
Overloaded functions are ok, but they take up much more Program memory, and makes code-changing more difficult, since one change must be made in several places. Debugging is more difficult aswell.
hbx2013:
Overloaded functions are ok, but they take up much more Program memory, and makes code-changing more difficult, since one change must be made in several places. Debugging is more difficult aswell.
But every overloaded functions can call a single private function
But you need to know what cast do in every situation.
And, you can only use void pointers IF the things pointed to are TRULY interchangeable. For instance, a pointer that points to a char array and a pointer that points to a byte array are truly interchangeable, since both types are the same size.
A pointer to a String and a pointer to an array are NOT interchangeable. You can, as was pointed out, extract the char array from the String, and then call the version that expects an array (probably with a cast).