Rep-string
Template:Draft text Given a series of ones and zeroes in a string, define a repeated string as a string which is created by repeating a substring of the first N characters of the string two or more times, truncated to the length of input string.
For example, the string '10011001100' is a repeated string as the leftmost four characters of '1001' are repeated three times and truncated on the right to give the original string.
The task is to:
- Write a function/subroutine/method/... that takes a strinmg and returns an indication of if it is a repeated string and the repeated string. (Either the string repeated, or the number of repeated characters would suffice).
- EMERGENCY - FLAT TYRE! BACK LATER.