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.
Well, as
@Chrono79
said. You're using the same length as the previous string to make the array for the new string. So, on index0
and last index are filled with blank values and automatically converted into a space byString
. So, you should set the char array length to the previous string length minus 2 (Since we're removing two chars). After that, you need to handle the assignment in the loop.Good luck.
@zr.hossain
See carefully, there is space in your answer. So, no. It's not the same.
Your code is wrong, not a kata issue. If it has two chars less, why do you use the same length?