String Manipulation and CamelCase strings
Posted on 2007-07-28
i am trying to break a camel cased string into it's various words.
I pass in "thisIsAnExmaple" and wish to get out "This Is An Exmaple" but i am failing. can anyone see what i am doing wrong?
private string ResolveCamelCase(string input)
for (int i = input.Length - 1; i > 0; i--)
if (input[i].ToString() == input[i].ToString().ToUpper())
input.Insert(i, " ");
input = input.ToString().ToUpper() + input.Substring(1);