Borderizing Texts by leonid

gets
s='| '+split*' | '
a=s.gsub(/[^| ](\S)?/){$1?10:1}+k=' |'
puts' '+'_'*s.size,a.tr('01',k),s+k,a.tr(*'01 
|_')

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top