Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.42 KB | None | 0 0
  1. stock alt_strcmp(const string1[], const string2[], bool:ignorecase=false, length=cellmax)
  2. {
  3.     if (length == 0) {
  4.         return 0;
  5.     }
  6.  
  7.     if (string1[0])
  8.     {
  9.         if (string2[0]) {
  10.             return clamp(strcmp(string1, string2, ignorecase, length), -1, 1);
  11.         }
  12.         else {
  13.             return 1;
  14.         }
  15.     }
  16.     else
  17.     {
  18.         if (string2[0]) {
  19.             return -1;
  20.         }
  21.         else {
  22.             return 0;
  23.         }
  24.     }
  25. }
  26.  
  27. #define _ALS_strcmp
  28. #define strcmp( alt_strcmp(
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement