trouble with associative Arrays

atzensepp webwicht at web.de
Sat Jan 20 15:16:00 UTC 2024


Thank you T for your hint. This worked perfectly
On Saturday, 20 January 2024 at 14:44:49 UTC, H. S. Teoh wrote:
> Because .byLine reuses its line buffer.  You want .byLineCopy 
> instead.

The section looks now simpler although I guess that there are 
more appropriate mechanisms available (csvreader):

     string [] orgids[string];
     foreach (line; range)
     {
         if (!line.empty)
         {
             auto row = line.split(";");
             string word = row[1];
             if(word.length>0 && word[0] == '\"')
                     word= word[1 .. $-1];
             orgids[word]=row;
             i++;
         }
     }


More information about the Digitalmars-d-learn mailing list