Method code for $string.left()

[Turn on line numbering]
arg str, width, @fchar;

// will not chop off 'str' if it is longer than width, use pad() for that.
[(fchar ?= " ")] = fchar;
if (strlen(str) < width)
    return str + pad("", width - str.length(), fchar);
return str;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon