Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9f4e855f1eedb37a41a0fe4753d17583f5331b10
Ticket: 3608714fffffffffffffffffffffffffffffffff
[string replace] refuses to replace empty substrings
User & Date: dgp on 2015-02-18 20:45:35
Changes

  1. closer changed to: "nobody"
  2. 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.
    
  3. icomment:
    
    See also:
    
    https://sourceforge.net/p/tcl/mailman/message/20466029/
    
  4. login: "dgp"
  5. mimetype: "text/plain"
  6. severity changed to: "Minor"