Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 0dcbc68728f0ff9f02d20cb3dcc101798563001a
Ticket: 2845214fffffffffffffffffffffffffffffffff
Malfunction of "string trimright" with certain strings
User & Date: andreas_kupries on 2009-08-27 05:39:08
Changes

  1. 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
    
    
    
    
    
    
    
  2. login: "andreas_kupries"
  3. mimetype: "text/plain"
  4. username: "andreas_kupries"