ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcllib-bugs
tcllib-bugs
[Tcllib-bugs] [ tcllib-Patches-1469593 ] Add delimiter support
by SourceForge.net other posts by this author
Apr 12 2006 7:09PM messages near this date
[Tcllib-bugs] Rash Guard | [Tcllib-bugs] tcllib-cvs: "tklib/modules/tablelist/scripts tablelistBind.tcl" modified
Patches item #1469593, was opened at 2006-04-12 19:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312883&aid=1469593&group_id=12883

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: csv
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Andreas Kupries (andreas_kupries)
Summary: Add delimiter support

Initial Comment:
The CSV package that comes with tcllib only accepts
double-quotes as the delimiter character when parsing
input data or when generating output.

I have changed it to accept any character as delimiter.
 The delimiter can be specified as an optional extra
argument. 


Sample:

% package req csv

% ### use single quote as delimiter
% set line "1,'abc , def',ttt,20.5"


% csv::split $line , '
1 {abc , def} ttt 20.5

% ### join the list back again with @ as delimiter
% ### and : as separator
% set line2 [csv::join [csv::split $line , '] : \@]
@1@:@abc , def@:@ttt@:@20.5@

% ### get back the original list
% csv::split $line2 : @
1 {abc , def} ttt 20.5





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=312883&aid=1469593&group_id=12883


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Tcllib-bugs mailing list
Tcllib-bugs@[...].net
https://lists.sourceforge.net/lists/listinfo/tcllib-bugs

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved