digitalmars.D.bugs - std.string.split()
- Gareth Baker (8/8) Oct 22 2005 Hi,
- Oskar Linde (5/15) Oct 23 2005 Hi,
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>