June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
17
Task/Rep-string/BaCon/rep-string.bacon
Normal file
17
Task/Rep-string/BaCon/rep-string.bacon
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
all$ = "1001110011 1110111011 0010010010 1010101010 1111111111 0100101101 0100100 101 11 00 1"
|
||||
|
||||
FOR word$ IN all$
|
||||
FOR x = LEN(word$)/2 DOWNTO 1
|
||||
|
||||
ex$ = EXPLODE$(word$, x)
|
||||
|
||||
FOR st$ IN UNIQ$(ex$)
|
||||
IF NOT(REGEX(HEAD$(ex$, 1), "^" & st$)) THEN CONTINUE 2
|
||||
NEXT
|
||||
|
||||
PRINT "Repeating string: ", word$, " -> ", HEAD$(ex$, 1)
|
||||
CONTINUE 2
|
||||
NEXT
|
||||
|
||||
PRINT "Not a repeating string: ", word$
|
||||
NEXT
|
||||
Loading…
Add table
Add a link
Reference in a new issue