.
D 2003-01-24T00:56:03
J assignee dkf
J cmimetype text/plain
J comment split\scommand\sdoes\snot\shandle\smultiple\swhite\sspace\sproperly.\s\n\nTCL\ssplit\sshould\swork\slike\sthe\sPerl\ssplit\scommand.\sI\sknow\sits\s\ndocumented\sthat's\sthe\sway\sTCL\ssplit\sworks.\sBut\swhat\swe\swant\sis\s\nthe\svalid\sdata\snot\sa\sbunch\sof\snull\stoken\s{}\s\stht\shave\sto\sbe\s\ndiscarded\sby\sa\sfew\smore\sline\sof\scode.\n\nExample:\s\n$line\s=\s1\s\s\s\s\s2\s\s\s\s\s3\s\s\s\s\s4\s\s\s\s\s5\s\s(mutiple\sspaces\sbetween\sthe\snumbers)\n\nPerl:\nparts[]\s=\ssplit\s(\s'\s'\s,\s$line)\nproduces\san\sarray\swith\sthe\s5\snumeric\stokens\s1,2,3,4,5\n\nTCL:\n\nset\sparts\s[split\s$line]\nproduces\san\sarray\swith\s1\s{}\s{}\s{}\s{}\s{}\s2\s{}\s\setc\nThen\syou\shave\sto\sget\srid\sof\sthe\s{}\sby\sextracting\sto\sanother\sarray\s\nonly\sthe\svalid\snumeric\stokens\s1,2,3,4,5
J foundin obsolete:\s8.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 18.\sCommands\sM-Z
J title split\scommand\s\sdoes\snot\shandle\smulti\swhitespace\sproperly
J type RFE
K 673725ffffffffffffffffffffffffffffffffff
U nobody
Z cc208c037d99464ae333aebe6af6c576