Re: DLLs, a better split()

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

Commenting on a posted split() function I originally wrote:

>>The problem with your function is that leading as well as trailing
>>occurrences of the delimiter show up as empty strings each, and so do
>>multiple occurrences of it inside the string.

Ralf responded:

>Yes, when two delimiters follow each other up, an empty sequence is added,
>but thats the most consitent and wanted behaviour. Because, there is
missing
>something. If we do \n\n we dont want ex.exe to think that we only jump
down
>one line do we ?

There is definitely something missing in there ok, how about a bit of
common sense and some logic? So three spaces will convert to two extra
empty strings (or is it two extra one line jumps?), and the most
common DOS line delimiter (cr lf) will force double spacing... Thanks,
but most definitely not in mine! jiri

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

Search



Quick Links

User menu

Not signed in.

Misc Menu