as mentioned in the title I am trying to turn a given string with spaces in between words into a camel case format, for example: "camel case" becomes "camelCase".
My method is to try and turn the string into an array of characters, and then check if the previous character was a space, but I am stuck on the part where I am using a Where() method in order to check every character:
str = new string(str.Where(x => Array.IndexOf(str.ToCharArray(), x) - 1 != ' ').ToArray());
This just returns the original string without doing anything.
Any help would be appreciated, and maybe you could suggest a better way of doing it too, after all, we're all in this together right?