Question: Problem 1A: Create a method called toCamelCase that accepts a string as an input and outputs that string in camelCase. (i.e. no spaces and all

Problem 1A:

Create a method called toCamelCase that accepts a string as an input and outputs that string in camelCase.

(i.e. no spaces and all words capitalized except the first. thisIsACamelCasedSentence)

This must be achieved recursively. The method does not have to handle punctuation, but must be able to handle any number of spaces between words, or at the beginning and/or end of the input string.

Example

input:

pErHaPs I hAVe wRitten a Sentence LiKE this one

Output:

perhapsIHaveWrittenASentenceLikeThisOne

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!