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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Library FunctionsSTRCHR, STRICHRSynopsis#include char * strchr (const char * s, int c)char * strichr (const char * s, int c)DescriptionThe strchr() function searches the string s for an occurrence of the character c. If one is found, apointer to that character is returned, otherwise NULL is returned.The strichr() function is the case-insensitive version of this function.Example#include #include voidmain (void){static char temp[] = "Here it is...";char c = ’s’;}if(strchr(temp, c))printf("Character %c was found in string\n", c);elseprintf("No character was found in string");See Alsostrrchr(), strlen(), strcmp()Return ValueA pointer to the first match found, or NULL if the character does not exist in the string.199

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

Saved successfully!

Ooh no, something went wrong!