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.
wow!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
f.trim(); would also work in this case - I find it easier to read than substring, though substring is more efficient probably.
I don't get why there are three spaces in the assertion of the "hello world" part of the basic test - given the description I would much rather expect two.
//Modified copy of the "basic" unit test from the task.
public class SpacifyTest {
@Test
public void basicTest() {
assertEquals("h e l l o| | | |w o r l d",Spacify.spacify("hello world")); //three | | on the left side of the assertion?!
assertEquals("1 2 3 4 5",Spacify.spacify("12345"));
}
}