Write a function that will turn a camelCase word into a regular one by adding spaces and lower-casing the words.
Examples
ccbreaker("camelCasing")
== "camel casing"
ccbreaker("garbageTruck")
== "garbage truck"
Tests
ccbreaker("policeSiren")
== "police siren"
ccbreaker("camelCasingTest") ==
"camel casing test"`
Good luck!
This challenge comes from hakt on CodeWars. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!
Want to propose a challenge idea for a future post? Email yo+challenge@dev.to with your suggestions!
Top comments (10)
JavaScript using regex
Java Streams
dart
C++ solution
Python
Java
In rust!
Rust Playground
GitHub Gist
Rare case where PHP is concise.
3v4l.org/1vCqj
python
The link seems to be after a completely different test