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.
nice!
nice hack using length of source as maxlength
Also,
strings.Split(s, " ") is equvalent to string.Fields(s)
I'd say the proper way is:
Seen this on Go blog.
Cheers :)
This solutions doesn't account for unicode characters!
E.g.
len("→")
=> 2Use
len([]rune("→")
=> 1