Method code for $has_text.ins_lines()

[Turn on line numbering]
arg lines, loc;
var line, t;

// inserts txt at loc (where loc is an integer)
if (!.is_writable_by(sender()) && sender() != this())
    throw(~perm, "Permission Denied.");
t = .get_raw_text();
if (type(lines) != 'list)
    throw(~type, "Lines should be passed as a list of strings.");
for line in (lines) {
    t = (> t.insert(loc, line) <);
    ++loc;
}
.set_text(t);

// $#Edited: 23 May 97 08:08 $user_bruce

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

the Cold Dark