Steve Wampler wrote:
> The 2nd version I posted earlier today handles quoted fields correctly,
> including nested fields [he claims...], such as:
>
> "this,""has,nested"",fields"
>
> but had one typo. The line:
>
> sep := zapPrefix(!args, "--separator=")
>
> should be:
>
> sep := zapPrefix(!args, "--separator=") | ","
>
> Without that fix you have to give the "--separator=,"
> option to get comma-separated-value parsing.
Oh. If anyone wants to test that version (with the above fix) without
having to grab UniLib, you can remove the "import Utils" line
and append the following lines to the end:
procedure zapPrefix(s, # String to examine
prefix # Prefix to find and remove
)
return 3(string(s), s[1+:*prefix] == prefix, s[*prefix+1:0])
end
procedure makeProc(A)
return (@A[1], A[1])
end
Those are the two routines used from the Utils package.
If you find something that breaks it (that shouldn't!), let me
know (directly or via the list).
--
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group