Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,8 @@
repstr? := proc( s :: string )
local per := StringTools:-Period( s );
if 2 * per <= length( s ) then
true, s[ 1 .. per ]
else
false, ""
end if
end proc:

View file

@ -0,0 +1,16 @@
> Test := ["1001110011", "1110111011", "0010010010", "1010101010", "1111111111", \
"0100101101", "0100100", "101", "11", "00", "1"]:
> for s in Test do
> printf( "%*s\t%5s %s\n", 3 + max(map(length,Test)), s, repstr?( s ) )
> end do:
1001110011 true 10011
1110111011 true 1110
0010010010 true 001
1010101010 true 10
1111111111 true 1
0100101101 false
0100100 true 010
101 false
11 true 1
00 true 0
1 false