Method code for $list.numbered_text()

[Turn on line numbering]
arg text;
var line;

// receives a list of strings, returns that list with line numbers
// prepended
return map line in [1 .. text.length()] to ("%3r: %l".format(line, text[line]));

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark