[Turn off line numbering]1: arg lines, loc; 2: var line, t; 3: 4: // inserts txt at loc (where loc is an integer) 5: if (!.is_writable_by(sender()) && sender() != this()) 6: throw(~perm, "Permission Denied."); 7: t = .get_raw_text(); 8: if (type(lines) != 'list) 9: throw(~type, "Lines should be passed as a list of strings."); 10: for line in (lines) { 11: t = (> t.insert(loc, line) <); 12: ++loc; 13: } 14: .set_text(t);
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit