On Sunday, 20 July 2014 at 16:11:03 UTC, John Colvin wrote:

Even without ranges, you can do this:

      string [] fileList;

      ... fill list

      if (sort)
          sort(fileList);

      foreach(filename, fileList) {
          ... do something;
      }

because sort works in-place.

Oh, I see that now. Guess when I saw it returned a SortedRange, I stopped reading and missed the bit about the underlying array also being sorted.

Thanks for the quick help,
Bob

Reply via email to