Get the repeat times of basic substring in a given string
int is_repeat_str( string str )
total repeat times of basic substring in the given string
EX1
void is_repeat_str_ex1() { string str = "XYZXYZXYZ"; //change str to "XXYY" to see different result int nRet = is_repeat_str(str); if(nRet>0) printf("the basic string repeats %d times in \"%s\"\n" ,nRet, str ); else printf("the \"%s\" is not a repeat string\n" , str); }
origin.h