11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Library FunctionsSTRCMP, STRICMPSynopsis#include int strcmp (const char * s1, const char * s2)int stricmp (const char * s1, const char * s2)DescriptionThe strcmp() function compares its two, null terminated, string arguments and returns a signedinteger to indicate whether s1 is less than, equal to or greater than s2. The comparison is done withthe standard collating sequence, which is that of the ASCII character set.The stricmp() function is the case-insensitive version of this function.Example#include #include voidmain (void){int i;}if((i = strcmp("ABC", "ABc")) < 0)printf("ABC is less than ABc\n");else if(i > 0)printf("ABC is greater than ABc\n");elseprintf("ABC is equal to ABc\n");See Alsostrlen(), strncmp(), strcpy(), strcat()201

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!