Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-21
02:34 • Ticket [218144ffff] string trimright trims extra characters status still Clo... artifact: da61f0135e user: dgp
2000-10-26
08:15 • Closed ticket [218144ffff]. artifact: f203010de8 user: welch
00:53 • New ticket [218144ffff]. artifact: 875ae8b010 user: nobody

string trimright trims extra characters

Closed / Invalid218144ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:53:43
OriginalBugID: 2103 Bug
Version: 8.0.5
SubmitDate: '1999-05-19'
LastModified: '1999-08-08'
Severity: MED
Status: Closed
Submitter: pat
ChangedBy: hobbs
OS: All
OSVersion: NA
Machine: NA
FixedDate: '2000-10-25'
FixedInVersion: NA
ClosedDate: '1999-08-08'


Name:  Benjamin Alfred Bailey
email:  [email protected]
Support:  None
Severity:  3
OperatingSystem:  Sun Solaris
Synopsis:  string trimright trims extra characters

ReproducibleScript:
    set material magnesium.mat
    set $material [string trimright .mat]
    

ObservedBehavior:
    $material is set to magnesiu
    

DesiredBehavior:
    $material should be set to magnesium
    

Comments:
    Running on Sun Solaris and Windows NT 4.0


This is the expected behavior, as documented.  The trim*
methods interprets the given string as a SET of chars to
trim, and trims each in any order until none are found.
Thus the extra 'm' is removed because it is in this set.
The user wants either [string range], or more appropriate
for this case [file root]. 
-- 08/08/1999 hobbs
welch Closed ticket [218144ffff]. [History diff]2000-10-26 08:15:56
dgp Ticket [218144ffff]: 4 changes [History diff]2001-04-21 02:34:05
Log in (anonymous is fine) to add a comment.