Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7dc6c9ad320b7e550279d1b76ac2a126e2cf3611
Ticket: 3608714fffffffffffffffffffffffffffffffff
[string replace] refuses to replace empty substrings
User & Date: dgp on 2013-03-21 14:11:51
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    Can't believe I missed this.  Should have been part
    of the Do Nothing Gracefully cleanup.
    
    You cannot use [string replace] to insert a substring
    without at the same time taking at least on character
    out.
    
    % string replace abcde 1 0 h
    abcde
    
    Instead of the result any sane programmer would
    expect:
    
    ahbcde
    
    In particular, the useful case of prepending is not
    supported.
    
    Recategorize to a Feature Request if you must.  (This
    misfeature is documented, FFS).  But it's so boneheaded
    it looks like a bug to me.
    
    
    
  4. foundin changed to: "current: 8.6.0"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dgp"
  10. subsystem changed to: "18. Commands M-Z"
  11. title changed to:
    [string replace] refuses to replace empty substrings
    
  12. type changed to: "Bug"