05.06.2015, 06:18
You can either capitalize (or minimize) both and compare them:
Here is a function i use to capitalize names (you can use tolower to minimize)
Or you can easily set the ignore case to true so it wont matter if its capitalized or not in strcmp:
Here is a function i use to capitalize names (you can use tolower to minimize)
Код:
stock Capitalize(name[]) { new string[MAX_PLAYER_NAME+1]; for (new i, j = strlen(name); i < j; i++) { format(string, sizeof (string), "%s%c", string, toupper(name[i])); } return string; }
Код:
strcmp(const string1[], const string2[], bool:ignorecase, length)
Quote:
When set to true, the case doesn't matter - HeLLo is the same as Hello. When false, they're not the same. |