« first day (80 days earlier)    last day (15 days later) » 

3:24 PM
@Julian, I am really sorry to disturb you again. But, geez, ran into a problem with the code that you made. Sorry.
What I did was changed the value of "th" to 2 instead of 3. Which basically means that the substring should repeat two times to qualify being the output.
Then, I ran the code with the string "010110010" and it outputs,
"10" "0" "010" "" "01" "00" "01" "".

However, for a repetition of 2 (which I set the value of th as), the output should have included "101" and "011" and "110".
 
 
6 hours later…
9:51 PM
@Julian, I think this has stopped working now.
 
10:20 PM
Also, julian, the original code that you sent me as it is stops working for the following string: "abcadcaec". Here, the output should be "abc" , but it outputs a null string.
 

« first day (80 days earlier)    last day (15 days later) »