Find the repeat appearance times of the end character at the end of a string.
int find_end_char_number( const string & str, char ch )
the repeat appearance times of the end char in the end of str
EX1
void find_end_char_number_ex1() { string str = "abcdeppp"; char ech = 'p'; //Change 'p' to other char to see different result int nRet = find_end_char_number(str, ech); if(nRet) printf("End char \'%c\' repeat %d times in \"%s\" \n" ,ech,nRet,str); else printf("\'%c\' is not the end char in \"%s\"\n" ,ech,str); }
origin.h