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.
But I like your solution very much) This is many times better then one I write
Oh, didn't know that about the calloc, thank you for pointing this out!
result[size] = '\0'; is not needed as calloc nullifies the allocated memory.
function isupper() could be used instead of string[index] >= 'A' && string[index] <= 'Z'.
Nice solution though
FIxed in list of C katas to update
ok, looking on others people solutions I think I'm dumb
I encountered this too.
This comment is hidden because it contains spoiler information about the solution
When building C code compiler returns this mistake:
fixture.c: 16: 20: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
for (int i = 0; i <input_sz; i ++)
~ ^ ~~~~~~~~
Can be easily fixed either by adding 'unsigned' into the for loop or by deleting unsinged from input_sz variable.