The output string seems a bit not logical when spaces == False: if spaces are not counted, the truncated output should contain mx characters AND all the spaces before that limit.
That would make the kata a bit more interesting... ;) (of course, this would invalidate lots of solutions. You could write a new verison this way and link the two between themselves, in their descriptions).
The output string seems a bit not logical when
spaces == False
: if spaces are not counted, the truncated output should containmx
characters AND all the spaces before that limit.That would make the kata a bit more interesting... ;) (of course, this would invalidate lots of solutions. You could write a new verison this way and link the two between themselves, in their descriptions).