How do I “normalise” caps & spaces?
Example: coreControllerC4a automatically turns into Core Controller C4a when function is called?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a starting example
which results in
Of course, there are many counter-examples, and this doesn’t cover Unicode, but it does show using a regular expression to split a string. (Note the use of a look-ahead to avoid consuming any data at the split.) Now it’s just a matter of transforming (“map”ing) each element to the correct case.
Happy coding.