October 22, 2005
Hi,

I've just discovered D and have loaded the GCC fronted on my Mac. I'm trying some simple stuff and have come across a problem. I'm using string.split("a line of text with % in it, some more text", ","). Split seems to choke on lines with a "%" in. Is this normal behaviour? Would std.regexp.split be a better bet?

Thanks
Gareth Baker

October 23, 2005
Gareth Baker wrote:

> Hi,
> 
> I've just discovered D and have loaded the GCC fronted on my Mac. I'm trying some simple stuff and have come across a problem. I'm using string.split("a line of text with % in it, some more text", ","). Split seems to choke on lines with a "%" in. Is this normal behaviour? Would std.regexp.split be a better bet?
> 
> Thanks
> Gareth Baker

Hi,

Split should not choke on the %... But your output method may. Try printing the substrings with writef("%s",str);

/Oskar