StringVariable | String value to chop. Can be either a value or @VarName (will upvar and read/write). |
Count | Optional. How many characters to chop. Default is 1. |
string range
and has behavior consistent with values that are less than zero or past the end of the string.Note that arguments of the form XxxVariable can take either a normal value or the name of a variable to read/write, prefixed by @. See About Using @ for details.
% ChopRight "abcd"
abc
% ChopRight "xyz" 2
x
% set MyString abcd
% ChopRight @MyString 2
ab
% puts $MyString
ab