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.
Also, the amount of spaces required will differ from the original text. If you want a safe allocation, we might need to alloc (2 * strlen(text) + (strlen(text)- 1))). Because for each possible letter you are allocating 1 extra byte for safety, and 1 extra byte for space, excluding the last char(hence strlen(text - 1)). In case the string is, for example "Abcdefghijklmonpqrzx" - no spaces at all, and letters that do consume 2 bytes - this will work, whereas allocating for strlen(text) wont.