Advertisement
evgen1137

Untitled

Feb 24th, 2017
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. static cell AMX_NATIVE_CALL TP_ToLowerString_dartfol(AMX *amx, cell *params)
  2. {
  3.     cell *pAddress = NULL;
  4.     unsigned char s;
  5.     amx_GetAddr(amx, params[1], &pAddress);
  6.     while(*pAddress)
  7.     {
  8.         s = *(char*)pAddress;
  9.         if(s > 64 && s < 91) // буквы A-Z
  10.             s += 32;
  11.         else if(s > 191 && s < 224) // буквы А-Я
  12.             s += 32;
  13.         else if(s == 168) // буква Ё
  14.             s = 184;
  15.         *(char*)pAddress = s;
  16.         pAddress++;
  17.     }
  18.     return 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement