digitalmars.D.bugs - std.string.split()
- Gareth Baker <g.j.baker dl.ac.uk> Oct 22 2005
- Oskar Linde <olREM OVEnada.kth.se> Oct 23 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
Oct 22 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
Oct 23 2005








Oskar Linde <olREM OVEnada.kth.se>