Artifacts Associated With Ticket 673725ffffffffffffffffffffffffffffffffff
Ticket change [3fe713c94c] (rid 121539) by nobody on 2003-01-24 00:56:03:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
split command does not handle multiple white space properly. TCL split should work like the Perl split command. I know its documented that's the way TCL split works. But what we want is the valid data not a bunch of null token {} tht have to be discarded by a few more line of code. Example: $line = 1 2 3 4 5 (mutiple spaces between the numbers) Perl: parts[] = split ( ' ' , $line) produces an array with the 5 numeric tokens 1,2,3,4,5 TCL: set parts [split $line] produces an array with 1 {} {} {} {} {} 2 {} etc Then you have to get rid of the {} by extracting to another array only the valid numeric tokens 1,2,3,4,5 - foundin initialized to: "obsolete: 8.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to:
split command does not handle multi whitespace properly
- type initialized to: "RFE"
Ticket change [9ba7f03220] (rid 111164) by nobody on 2003-01-24 08:05:38:
- icomment:
Logged In: NO Example: Instead of the following manipulation to do a split foreach sym [split $symbol_list] { if {[string length $sym] == 0} continue set ticker_symbols([incr i]) $sym } Should only have to do the following set ticket_symbols [split $symbol_list ] - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [d4865c52e6] (rid 123460) by andreas_kupries on 2003-01-24 09:01:11:
- assignee changed to: "nobody"
- foundin changed to: "None"
- icomment:
Logged In: YES user_id=75003 This is not a bug. The very usage of "should work" makes it already a feature request. Switched categorization. Another workaround than described in the comments is to regsub { *} $line { } newline to get rid of sequences of more than one spave and then to [split] the $newline. - login: "andreas_kupries"
- mimetype: "text/plain"
- subsystem changed to: "None"
- username: "andreas_kupries"
Ticket change [9e4124ef97] (rid 96447) by andreas_kupries on 2003-01-24 09:02:14:
- assignee changed to: "dkf"
- subsystem changed to: "18. Commands M-Z"
Ticket change [a25a56e306] (rid 109873) by dgp on 2003-01-24 11:25:39:
- icomment:
Logged In: YES user_id=80530 The original requester wants this: package require textutil namespace import textutil::splitx rename split {} rename splitx split There. Now [split] does what he wants. Be warned that this may break packages that expect the [split] command to behave as documented in Tcl. (It's possible this will even break the textutil package itself. Haven't tested.) But for your own limited purposes this might be an option. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [c85b8ef976] (rid 122087) by dkf on 2003-02-20 22:57:18:
- assignee changed to: "nobody"
- icomment:
Logged In: YES user_id=79902 The original requester could use this: set parts [regexp -all -inline {\S+} $line] Since there's such a trivial workaround, I'll change the title to indicate what they're really after. - login: "dkf"
- mimetype: "text/plain"
- title changed to: "splitx in core"
- username: "dkf"
Ticket change [48b0c7a246] (rid 99938) by dkf on 2003-02-23 00:31:06:
- assignee changed to: "dkf"
Ticket change [f2eb69550e] (rid 261547) by serhiy.storchaka on 2026-11-13 11:18:45:
- closedate changed to: "2461357.9713335303"
- closer changed to: "serhiy.storchaka"
- icomment:
Closing: the alternatives given above cover this, and adding splitx to the core never got a TIP.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Wont Fix"
- status changed to: "Closed"