Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6e9c512618e2f7a7dbf5c4edc042c829dbcb36914aa22113368f3213c0a1cadf
Ticket: 8cd74c5cd2e93ad82b6913847a08381977eaefc3
2-argument string toupper/tolower/totitle doesn't work as documented
User & Date: sebres on 2025-07-12 17:26:14
Changes

  1. icomment:
    I'm also for documentation change...<br/>
    Just because this behaviour (first is just an index without last) is at least since 8.5 (if not earlier), so even if actual docu says something different, the code works as it works everywhere dozen years and there is no one reason to change the behaviour of tcl for the sake of documentation.
    
    Especially because it is pretty simple to force the change case to the end, with supplying the `last` as `end` (to cause "documented" behaviour):
    
    ```
    % string tolower ABCDE 2
    ABcDE
    % string tolower ABCDE 2 end
    ABcde
    ```
    
    @Jan, by the way, you wrote the same statement (result) for both variants, so here again (and a bit more clear example):
    
    ```
    # if the code wins:
    % string tolower ABCDE 2
    ABcDE
      \------- only given index
    
    # if the docu wins:
    % string tolower ABCDE 2
    ABcde
      \-/ ---- from given index to end
    ```
    
  2. login: "sebres"
  3. mimetype: "text/x-markdown"