Edge cases such as ':' aren't addressed or tested for. Nor are there tests for ' '.
Plus it's very probably a duplicate.
Sorry, meant to be listed as a suggestion.
It only says to ignore leading or traling spaces, it doesn't say anything about multiple spaces between words, so, not an issue (a suggestion maybe).
This comment is hidden because it contains spoiler information about the solution
You can't accept your own translation unless you're the kata author, you need to look for other power users to approve your translation ;-) The usual way to do is to either raise a suggestion about the translation or go to the official gitter chat.
(Also if the author is active a week is needed before translation can be approved by power users.)
Though in this case the kata is a duplicate and a translation wouldn't help it in any ways. Maybe you should choose a more prospective kata to make a translation next time ;-)
How exactly does a Kata Translation work? I mean I made a translation in Python 3 and not sure how it might eventually become part of the official Kata. I see a button to accept my own translation... but as expected that button does nothing (thought it was funny that it would have let me do that) and also the origional creator hasnt been seen since March 2017 or something like that. Hell, I dont even know if anyone would see this since the last comment was 7 months ago... oh well.
Imma go make some chicken strips
OK thanks - newbie here.
In that case it should be explicitly stated in the description as you wrote.
I noticed most of the solutions provided here do not account for having multiple spaces inside the string. They do trim() the spaces at the right- and lefthand side of the string, but if the string reads ' Houston, we have a problem', they count it -incorrectly- as 7 words, because of the 2 extra spaces between 'a problem'.
I know this isn't stated explicitly in the description, but I feel accepted solutions should take this into account. Or?
[edit: haha, multiple spaces between words are removed by this online editor, but I think you get the point ;-)]
Wow, a pithy solution !
Many thanks for taking the time to improve your Kata, your effort is much appreciated :D
Thanks. I have now stated in the Kata Description that contractions count as one word, and not two (as would be the case in Microsoft Word, for example).
Thank you. You are correct. I have now resolved this issue.
Yes, thank you. That's a good idea. I will add some randomly generated test cases.