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,24 @@
function longer(a, b)
try
b[endof(a)]
catch
return true
end
return false
end
function printlongest(io::IO)
lines = longest = ""
while !eof(io)
line = readline(io)
if longer(line, longest)
longest = lines = line
elseif !longer(longest, line)
lines *= "\n" * line
end
end
println(lines)
end
printlongest(str::String) = printlongest(IOBuffer(str))
printlongest("a\nbb\nccc\nddd\nee\nf\nggg")