Artifacts Associated With Ticket 2845214fffffffff
Ticket change [b91ef6c62a] (rid 129078) by jestone on 2009-08-26 22:27:04:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The following script produces incorrect output for "stringb": set stringa "teststring_a.pdb" set stringb "teststring_b.pdb" set outa [string trimright $stringa ".pdb"] set outb [string trimright $stringb ".pdb"] puts "$stringa -> $outa" puts "$stringb -> $outb" With several recent Tcl versions, I get this output: teststring_a.pdb -> teststring_a teststring_b.pdb -> teststring_ I would instead, expect this output to be correct: teststring_a.pdb -> teststring_a teststring_b.pdb -> teststring_b
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jestone"
- subsystem initialized to: "None"
- title initialized to:
Malfunction of "string trimright" with certain strings
- type initialized to: "Bug"
Ticket change [0dcbc68728] (rid 114426) by andreas_kupries on 2009-08-27 05:39:08:
- icomment:
No, this is not a bug. The string ".pdb" is not removed as a string. It is interpreted as a 'set of characters', and all characters in that set are removed. In your example the set contains the four characters {'.' 'p' 'd' 'b'}. Note the 'b'. And for "teststring_b.pdb" trimgright correctly removes the 'b' just before the underscore. Note the phrasing in the manpage (http://docs.activestate.com/activetcl/8.5/tcl/TclCmd/string.htm#M54): ... any trailing characters present in the string given by chars ... i.e. ... any ... character ... present in ... chars - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [4e846b9a66] (rid 125654) by andreas_kupries on 2009-08-27 05:39:14:
- assignee changed to: "andreas_kupries"
- closedate changed to: "2009-08-26T22:39:14"
- closer changed to: "andreas_kupries"
- icomment:
allow_comments - 1
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- subsystem changed to: "18. Commands M-Z"
- username: "andreas_kupries"