Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Vim shortcuts?
Submit code:
:w
Run examples: ???
This comment is hidden because it contains spoiler information about the solution
On that note,
I'd suggest this test case:
input = '1234567890123456789012345 12345678901234567890123451 2345678901234567890123';
expectedResult = '1234567890123456789012345\n123456789012345678901234-\n51 2345678901234567890123'
Test.expect(wordWrap(input) == expectedResult)
I don't think the fifth case really matters for a strict 25-char limit per line--there isn't a difference between the rendered lines.
On the other hand, removing the whitespace at the beginning of a line might let it be rendered on a single line instead of two.