foreach over split string

Ary Borenszweig ary at esperanto.org.ar
Wed Jul 17 07:55:12 PDT 2013


On 7/17/13 11:38 AM, JS wrote:
> On Wednesday, 17 July 2013 at 14:18:25 UTC, John Colvin wrote:
>> On Wednesday, 17 July 2013 at 14:09:28 UTC, JS wrote:
>>> Ok, spoke too soon again,
>>>
>>> my string requires compound splitting:
>>>
>>> foreach(ss; split(s, ","))
>>> {
>>>    split(ss, "|"); // ss can't be read at compile time although I can
>>> use ss directly
>>>    string a = ss; // works fine.
>>> }
>>
>> Is there any possibility you could provide a compilable example (or
>> not compilable, if that's the point :p )? It's an awful lot easier to
>> quickly give the right answer to a question if you take the time to
>> ask it clearly and precisely, in one go, with a minimised example.
>> Also, by virtue of you having made an example and checked it, it
>> prevents accidentally talking about problems in code that is actually
>> fine.
>
> Yes, but if ctfe's wern't so shitty it wouldn't be a problem in the
> first place.

If you think the language is shitty why are you using it?

You didn't pay for D, you are receiving it as a free tool. I don't think 
many people will help you if you continue with that attitude -.-



More information about the Digitalmars-d-learn mailing list