Your question is CamelCase Conversion Functions. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Andela's developer tooling needs consistent names for generated fields and readable labels for display. Implement both directions of a naming conversion: convert normal text into lower camelCase, then convert lower camelCase back into lowercase, space-separated text.
Implement convert_case(text, mode), where text is a string and mode is either "to_camel" or "from_camel".
"to_camel", treat spaces, hyphens, and underscores as word separators. Return the first word in lowercase and capitalize the first character of every later word."from_camel", insert word boundaries before uppercase letters, including boundaries between an acronym and a normally capitalized word. Return all words in lowercase, separated by single spaces.def convert_case(text, mode):