This challenge concerns strings such as:
"repeatedrepeatedrepeated"
... that are obtained by repeating a smaller string, which in this case is the string "repeated".
On a related note, since the string above is made of 3 repetitions, one way to produce this string is via the code "repeated".repeat(3).
Write a function that, given a string, either:
false if the string isn't made by repeating a smaller string or ...isRepeated("repeatedrepeatedrepeated") ➞ 3
isRepeated("overintellectualizations") ➞ False
isRepeated("nononononononononononono") ➞ 12
isRepeated("moremoremoremoremoremore") ➞ 6
isRepeated(",,,,,,,,,,,,,,,,,,,,,,,,") ➞ 24
To keep things a little simpler, all strings in the tests will have length exactly 24, just as in all the examples above. In particular, the answers will always be divisors of 24.