How to loop through characters of a string in D language?

russhy russhy_s at gmail.com
Sat Dec 11 19:50:55 UTC 2021


On Saturday, 11 December 2021 at 18:51:12 UTC, Rumbu wrote:
> On Saturday, 11 December 2021 at 14:42:53 UTC, russhy wrote:
>> Here is mine
>>
>> - 0 allocations
>>
>> - configurable
>>
>> - let's you use it how you wish
>>
>> - fast
>>
>
>
> You know that this is already in phobos?
>
>
> ```
> "abc;def;ghi".splitter(';').joiner
> ```

you need to import a 8k lines of code module that itself imports 
other modules, and then the code is hard to read

https://github.com/dlang/phobos/blob/v2.098.0/std/algorithm/iteration.d#L2917


More information about the Digitalmars-d-learn mailing list