Re: Parsing with StrTok

new topic     » goto parent     » topic index » view thread      » older message » newer message

cklester wrote:

> Juergen Luethje wrote:
>>
>> what do you *exactly* want to achieve?
>
> I've got a string that will be delimited by commas and/or line breaks.
> Kat's strtok's parse() routine seems to allow for multiple delimiters, but
> it doesn't seem to be working with '\n'. Got a fix? Kat?
>
> The final list needs to be in a sequence, of course.
>
> "one,two
> three"
>
> becomes { "one","two","three" }

OK. In order to be able to help you, I must know the answer to the other
question that I asked. What do you want "one,two,,more" to become? Note
the two adjacent commas.
     ->  { "one","two","more" }
or
     ->  { "one","two","","more" }
?

I don't have a fix for strtok's parse(), but I can give you another
function that does the job.

Regards,
   Juergen

-- 
Have you read a good program lately?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu