Method code for $string.right()

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

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

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

Tlon