[Turn off line numbering]1: arg str, len, @end; 2: 3: // chops string off end.length() characters before len and appends len 4: [(end ?= "...")] = end; 5: if (strlen(str) < len || strlen(str) < strlen(end)) 6: return str; 7: anticipate_assignment(); 8: return pad(str, len - strlen(end)) + end;
// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit