set i [set n [gets stdin s]] while {~[incr i -1]} {set j $i while {$j<$n} {puts [string ra $s $i $j] incr j}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page