Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
import Nanoquery.IO
|
||||
|
||||
def longer(a, b)
|
||||
try
|
||||
b[len(a)-1]
|
||||
return false
|
||||
catch
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
print "enter filename: "
|
||||
$f = new(File, input())
|
||||
|
||||
longest = ""
|
||||
lines = ""
|
||||
for x in $f.read()
|
||||
if longer(x, longest)
|
||||
lines = x
|
||||
longest = x
|
||||
else if !longer(longest, x)
|
||||
lines += "\n" + x
|
||||
end
|
||||
end
|
||||
|
||||
println lines
|
||||
Loading…
Add table
Add a link
Reference in a new issue