[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new module proposal: split
From: |
Sergey Poznyakoff |
Subject: |
Re: new module proposal: split |
Date: |
Wed, 06 Sep 2006 09:20:03 +0300 |
In mailutils, we use the function argcv_get:
int argcv_get (const char *string, const char *delim, const char *cmnt,
int *argc, char ***argv);
which breaks the `string' according to the delimiters in `delim',
eventually ignoring anything after the comment starter `cmnt'. It fills
in the array `argv' with the collected tokens and stores the number of
them in the memory location pointed to by `argc'. The array `argv' is
NULL terminated. Quotes and backslashes within `string' are handled in
shell-like fashion, i.e. "the \"new string\"" will produce two tokens
"the" and "new string".
The function returns 0 on success. Both `delim' and `cmnt' can be NULL.
It seems to do just what the proposed split module should be doing,
doesn't it?
Regards,
Sergey
- new module proposal: split, Davide Angelocola, 2006/09/05
- Re: new module proposal: split, Ben Pfaff, 2006/09/05
- Re: new module proposal: split, Davide Angelocola, 2006/09/05
- Re: new module proposal: split, Ben Pfaff, 2006/09/06
- Re: new module proposal: split, Ralf Wildenhues, 2006/09/06
- Re: new module proposal: split,
Sergey Poznyakoff <=
- Re: new module proposal: split, Davide Angelocola, 2006/09/06
- Re: new module proposal: split, Simon Josefsson, 2006/09/06