22.12.2009, 19:46
Easy strcmp macros
Usage:
Output:
And some kudos to westie
pawn Код:
#define @[%1:%2] (strcmp(%1, %2, true) == 0)
pawn Код:
printf("equal 1: %d", @["hello":"test"]);
printf("equal 2: %d", @["hello":"hello"]);
printf("equal 3: %d", @["hello":"HeLLo",false]);
printf("equal 4: %d", @["hello":"HeLLo",true]);
Код:
equal 1: 0 equal 2: 1 equal 3: 0 equal 4: 1