Writing advanced (more complicated) user-defined functions for character string processing. a) Review the concept and make sure you have a good understanding of how the predefined functions: <span _istranslated="1" style="font-weight: bolder;">strcmp</span> and <span _istranslated="1" style="font-weight: bolder;">strncmp</span> work.
b) Implement the new function:
int strccmp(const char* text1,const char* text2,char delimiter )
which compares two input texts (text1 and text2) until null-termination '\0' or a specified "delimiter" character.
Example call: int result = strccmp( "Abc=def" , "Abc=123" , '=' );
should result/return a zero value (which means "zero/no difference")
Comments
Leave a comment