NAME
ChopRight — Remove characters from the right end of the string.
SYNOPSIS
ChopRight StringVariable ?Count?
DESCRIPTION
Return Value
String with the characters removed.
Arguments
StringVariableString value to chop. Can be either a value or @VarName (will upvar and read/write).
CountOptional. How many characters to chop. Default is 1.
More Info
Note that this command is based on 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.


For information regarding exceptions / errors, see here.
EXAMPLES
% ChopRight "abcd"
abc
% ChopRight "xyz" 2
x
% set MyString abcd
% ChopRight @MyString 2
ab
% puts $MyString
ab
SEE ALSO
ChopLeft, DoubleChop, string
KEYWORDS
conversion, modify, string, text, transform