Re: odd behavior of split() function

2013-06-07 Thread Benjamin Thaut
Am 07.06.2013 09:53, schrieb Bedros: first of all, many thanks for the quick reply. I'm learning D and it's just because of the habit I unconsciously used printf instead of writef thanks again. -Bedros On Friday, 7 June 2013 at 07:29:48 UTC, Jonathan M Davis wrote: On Friday, June 07, 2013 0

Re: odd behavior of split() function

2013-06-07 Thread Bedros
first of all, many thanks for the quick reply. I'm learning D and it's just because of the habit I unconsciously used printf instead of writef thanks again. -Bedros On Friday, 7 June 2013 at 07:29:48 UTC, Jonathan M Davis wrote: On Friday, June 07, 2013 09:18:57 Bedros wrote: I would like

Re: odd behavior of split() function

2013-06-07 Thread Jonathan M Davis
On Friday, June 07, 2013 09:18:57 Bedros wrote: > I would like to split "A+B+C+D" into "A", "B", "C", "D" > > but when using split() I get > > "A+B+C+D", "B+C+D", "C+D", "D" > > > the code is below > > > import std.stdio; > import std.string; > import std.array; > > int main() > { > st

odd behavior of split() function

2013-06-07 Thread Bedros
I would like to split "A+B+C+D" into "A", "B", "C", "D" but when using split() I get "A+B+C+D", "B+C+D", "C+D", "D" the code is below import std.stdio; import std.string; import std.array; int main() { string [] str_list; string test_str = "A+B+C+D"; str_list = test_str.split