Re: very newbie question (sring confusion)

2011-06-03 Thread Lloyd Dupont
I did the following, what do you think of my implementation? (checking if my string and array usage could be improved / powered up!!!) string[] _locales = [en-AU, fr-FR]; string getCurrentLocal() { return fr-BE; } string[] getCandidates() { auto local = getCurrentLocal(); string

Re: very newbie question (sring confusion)

2011-06-03 Thread bearophile
Lloyd Dupont: I did the following, what do you think of my implementation? Those for loops seem better as foreach ones, or even reverse foreach ones. Probably in std.algorithm there is stuff to shorten your code. Bye, bearophile

Re: very newbie question (sring confusion)

2011-06-03 Thread Jonathan M Davis
On 2011-06-03 09:55, Lloyd Dupont wrote: I did the following, what do you think of my implementation? (checking if my string and array usage could be improved / powered up!!!) string[] _locales = [en-AU, fr-FR]; string getCurrentLocal() { return fr-BE; } string[] getCandidates() {

Re: very newbie question (sring confusion)

2011-06-03 Thread Lloyd Dupont
std.algorithm! will have a look, thanks! bearophile wrote in message news:isb5ql$1i23$1...@digitalmars.com... Lloyd Dupont: I did the following, what do you think of my implementation? Those for loops seem better as foreach ones, or even reverse foreach ones. Probably in std.algorithm