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.
Ah right thanks lol; also noted!
Note that it is undefined behavior to use the
ctype.h
functions with achar
, these functions are supposed to takeunsigned char
s as argumentsYou should avoid the use of the ctype.h header and its functions like tolower. The behavior of these functions can change based on locale. It's not an issue here since the tests run on the server with the same locale, but it's a problem when running code on other computers. You can either change the locale using setlocale, or write your own tolower.
Subtracting a size_t from a size_t is not well-defined when the result is negative. You should compare them first to ensure that the result is positive before subtracting them. Also, the use of the ternary operator here is just not necessary.