...
#define STREQ(str1, str2) (strcmp((str1), (str2)) == 0)
If ( STREQ( inputstring, somestring ) ) ...
By defining a macro to adapt the comparison function, the code clearly illustrates its intent and agrees with implied behavior.
...
#define STREQ(str1, str2) (strcmp((str1), (str2)) == 0)
If ( STREQ( inputstring, somestring ) ) ...
By defining a macro to adapt the comparison function, the code clearly illustrates its intent and agrees with implied behavior.