Trim the end off a string

trim(x, len)

Arguments

x

string

len

number of characters to trim