Anti Caps Lock
#1

Hi all! I need anti caps lock script with "İ,Ş,З,Ц,Ь,Ğ" letters. Please help..
Reply
#2

PHP код:
ToLowerExtended(string[], len sizeof string)
{
    for(new 
ileni++)
    {
        
// 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;
        }    
    }

Not tested, based off of http://unicode-table.com
Reply
#3

PHP код:
stock ToLowerExtended(string[]){
    for(new 
0strlen(string); ji++){
        
string[i] = tolower(string[i]);
    }

Reply
#4

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
PHP код:
stock ToLowerExtended(string[]){
    for(new 
0strlen(string); ji++){
        
string[i] = tolower(string[i]);
    }

No, tolower and toupper functions working only with A..Z symbols.
Reply
#5

Quote:
Originally Posted by ZiGGi
Посмотреть сообщение
No, tolower and toupper functions working only with A..Z symbols.
tolower already have those checks internally.
Reply
#6

tolower on Windows server uses WinAPI function CharLower, and this function works with all ANSI symbols.
tolower on Linux server uses C function tolower, and this function works only with A..Z symbols.
Reply
#7

ZCMD using tolower, and worked.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)