01.07.2016, 16:19
Hi all! I need anti caps lock script with "İ,Ş,З,Ц,Ь,Ğ" letters. Please help..
ToLowerExtended(string[], len = sizeof string)
{
for(new i; i < len; i++)
{
// basic Latin
if('A' <= string[i] <= 'Z')
{
string[i] += 0x0020;
continue;
}
// Latin-1 Supplement
if((0x00C0 <= string[i] <= 0x00DE) && string[i] != 0x00D7) // 00D7 is multiplication symbol
{
string[i] += 0x0020;
continue;
}
// Latin Extended-A
if((0x0100 <= string[i] <= 0x017F) && !(string[i] & 1)) // even numbers are uppercase
{
string[i] += 0x0001;
continue;
}
}
}
stock ToLowerExtended(string[]){
for(new i = 0, j = strlen(string); i < j; i++){
string[i] = tolower(string[i]);
}
}