mirror of
https://gitlab.com/mfocko/CodeWars.git
synced 2024-11-24 09:41:55 +01:00
6kyu: add break camelCase
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
3fc8a805ef
commit
e394821b7b
2 changed files with 13 additions and 0 deletions
9
6kyu/break_camel_case/solution.rb
Normal file
9
6kyu/break_camel_case/solution.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
def solution(string)
|
||||||
|
string.chars.map { |c|
|
||||||
|
if c == c.upcase
|
||||||
|
" " + c
|
||||||
|
else
|
||||||
|
c
|
||||||
|
end
|
||||||
|
}.join
|
||||||
|
end
|
|
@ -214,6 +214,10 @@
|
||||||
|
|
||||||
- [Detect Pangram](https://www.codewars.com/kata/545cedaa9943f7fe7b000048) - [solution](6kyu/detect_pangram)
|
- [Detect Pangram](https://www.codewars.com/kata/545cedaa9943f7fe7b000048) - [solution](6kyu/detect_pangram)
|
||||||
|
|
||||||
|
### Ruby
|
||||||
|
|
||||||
|
- [Break camelCase](https://www.codewars.com/kata/5208f99aee097e6552000148) - [solution](6kyu/break_camel_case)
|
||||||
|
|
||||||
## 7 kyu
|
## 7 kyu
|
||||||
|
|
||||||
### JS
|
### JS
|
||||||
|
|
Loading…
Reference in a new issue