Re: Iterating chars by Word

2020-11-12 Thread Виталий Фадеев via Digitalmars-d-learn
On Friday, 13 November 2020 at 07:23:13 UTC, Виталий Фадеев wrote: On Friday, 13 November 2020 at 06:52:38 UTC, Виталий Фадеев wrote: On Friday, 13 November 2020 at 06:42:24 UTC, evilrat wrote: [...] Thanks, Ali. Thanks, Evilrat. I taste it now: https://run.dlang.io/is/HlSFVY Latest: https

Re: Iterating chars by Word

2020-11-12 Thread Виталий Фадеев via Digitalmars-d-learn
On Friday, 13 November 2020 at 06:52:38 UTC, Виталий Фадеев wrote: On Friday, 13 November 2020 at 06:42:24 UTC, evilrat wrote: [...] Thanks, Ali. Thanks, Evilrat. I taste it now: https://run.dlang.io/is/HlSFVY Latest: https://run.dlang.io/is/dfrcYj

Re: Iterating chars by Word

2020-11-12 Thread Виталий Фадеев via Digitalmars-d-learn
On Friday, 13 November 2020 at 06:42:24 UTC, evilrat wrote: On Friday, 13 November 2020 at 05:14:08 UTC, Виталий Фадеев wrote: [...] You can make your own range, however look at this function first (second example) https://dlang.org/phobos/std_algorithm_iteration.html#.splitter // 1) mi

Re: Iterating chars by Word

2020-11-12 Thread Ali Çehreli via Digitalmars-d-learn
On 11/12/20 9:14 PM, Виталий Фадеев wrote: Is: wchar[] chars;  // like a: "import core.sys.windows.windows;\nimport std.conv  : to;\n" Goal: foreach ( word; chars.byWord ) {     // ... } Iterating chars by Word... How to ? ( simple, fast, low memory, beauty, perfect ) import

Re: Iterating chars by Word

2020-11-12 Thread evilrat via Digitalmars-d-learn
On Friday, 13 November 2020 at 05:14:08 UTC, Виталий Фадеев wrote: Is: wchar[] chars; // like a: "import core.sys.windows.windows;\nimport std.conv : to;\n" Goal: foreach ( word; chars.byWord ) { // ... } You can make your own range, however look at this function first (second exa

Iterating chars by Word

2020-11-12 Thread Виталий Фадеев via Digitalmars-d-learn
Is: wchar[] chars; // like a: "import core.sys.windows.windows;\nimport std.conv : to;\n" Goal: foreach ( word; chars.byWord ) { // ... } Iterating chars by Word... How to ? ( simple, fast, low memory, beauty, perfect )