Skip to content
Tcl Source Code History Of Ticket 218721ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 218721ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 218721ffffffffffffffffffffffffffffffffff

  1. Ticket change [0e584d19ea] (rid 94599) by nobody on 2000-10-26 01:04:33:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 1845 RFE
      Version: 8.1b3
      SubmitDate: '1999-04-16'
      LastModified: '1999-08-06'
      Severity: LOW
      Status: Released
      Submitter: pat
      ChangedBy: hobbs
      OS: Other
      Machine: NA
      FixedDate: '1999-08-06'
      FixedInVersion: 8.1.1
      ClosedDate: '2000-10-25'
      
      
      Name:
      Jeffrey Hobbs
      
      CustomShell:
      This is the core mod, baby!
      
      Comments:
      I think this fully tested patch would make a great addition to 8.1,
          but realizing that that is close to final, they should definitely be
          folded into 8.2.  If you need good examples of where this saves times
          or improves logic for common tasks. you're not coding enough Tcl :^).
          
          The implementations were done to maintain 100% backwards compatibility
          with working code (changing the options to an arg can obviously change
          what error strings arise), and reduce any loss of speed (the only method
          that actually attained a speed loss was string index, as I throw a
          Tcl_NumUtfChars call in to support end-1 like indices, and that is not
          major).
      
      DesiredBehavior:
      There is some basic functionality missing in Tcl that causes commonly
          required functions to need multiple Tcl calls.  I have upgraded the
          core string command (with some minor list indexing benefits) to give
          better core functionality for string manipulation in Tcl.  These
          functions are fully tested (test suite included in patch, with all
          mods necessary to other tests) and documented.
          
          I made the following modifications:
          
          * string compare now takes optional length arg
          (for strncmp behavior)
          
          * added string equal (just a few lines of code blended
          in with string compare)
          
          * added string icompare/iequal for case-insensitive comparisons
          
          * string index's index can now be ?end[+-]?expression
          I made this change in the private TclGetIntForIndex,
          which means that the list commands also benefit, as
          well as string range, et al.
          
          * added [string repeat string count]
          Repeats given string <count> number of times
          
          * added string replace, string equiv to lreplace
            (quasi opposite of string range):
          string replace first last ?string?
          Example of use, replacing end of string with ...
          should the string be more than 16 chars long:
          string replace $string 16 end "..."
          This just returns the string len < 16, so it
          will only affect the long strings.
          
          * added optional first and last args to string to*
          This allows you to just affect certain regions of
          a string with the command (like just capping the
          first letter).  I found the original totitle to
          be too draconian to be useful.
          
          * added [string map charMap string]
          where charMap is a {from to from to} list that equates to
          what one might get from [array get].  Each <from> and <to>
          can be multiple chars (or none at all).  For Tcl/CGI users,
          this is a MAJOR speed booster.
      
      Patch:
      The patch comes to 64KB with full doc and test suite changes
      against the tcl8.1b3 sources.
      http://www.hobbs.wservice.com/tcl/capp/newstring.txt
      
      PatchFiles:
      C: tclUtil.c && tclCmdMZ.c
          doc: string.n
          tests: string.test cmd*.test l*.test error.test
      
      
      
      Added to 8.1.1. 
      -- 08/06/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.1b3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "Updated string command"
    11. type initialized to: "RFE"
  2. Ticket change [b192f49a81] (rid 98171) by welch on 2000-10-26 08:27:13:

    1. closedate changed to: "2000-10-26T01:27:13"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [9aed867356] (rid 111036) by dgp on 2001-04-17 06:00:16:

    1. status changed to: "Open"
  4. Ticket change [e2159dc7d4] (rid 87563) by dgp on 2001-04-17 06:00:17:

    1. foundin changed to: "None"
    2. subsystem changed to: "None"
  5. Ticket change [6f6c9e2036] (rid 100316) by dgp on 2001-04-17 06:00:51:

    1. closedate changed to: "2001-04-16T23:00:51"
    2. closer changed to: "dgp"
    3. status changed to: "Closed"
    4. subsystem changed to: "18. Commands M-Z"