Anyone know of a nice efficient function that could convert, for example:
HelloWorld –> Hello World
helloWorld –> Hello World
Hello_World –> Hello World
hello_World –> Hello World
It would be nice to be able to handle all these situations.
Preferably in in VB.Net, or C#.
I don´t know if this is the most efficient way. But this method works fine:
EDIT 1: I have include Char.IsUpper suggestion in the comments
EDIT 2: included another suggestion in the comments: ToCharArray is superfluous because string implements enumerable ops as a char too, i.e. foreach (char character in input)
EDIT 3: I’ve used StringBuilder, like @Dan commented.