Thread overview | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 18, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 Jack Stouffer <jack@jackstouffer.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jack@jackstouffer.com --- Comment #1 from Jack Stouffer <jack@jackstouffer.com> --- Does std.regex.splitter!(Yes.keepSeparators) suffice? -- |
July 19, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 --- Comment #2 from Manu <turkeyman@gmail.com> --- That's fine. Does that already exist? I couldn't see anything on dlang.org. Obviously the Pred function should remain as the first template arg, it can be second... -- |
July 19, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 --- Comment #3 from Jack Stouffer <jack@jackstouffer.com> --- (In reply to Manu from comment #2) > That's fine. > Does that already exist? I couldn't see anything on dlang.org. > > Obviously the Pred function should remain as the first template arg, it can be second... It's in the nightlies and on the prerelease docs. -- |
July 21, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 --- Comment #4 from Manu <turkeyman@gmail.com> --- Wait up. I misread... you say std.regex.splitter. No, that's not what I'm asking for. I'm interested in std.algorithm.iterator.splitter. It should be in those. -- |
December 27, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 greenify <greeenify@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |trivial CC| |greeenify@gmail.com -- |
December 30, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 --- Comment #5 from greenify <greeenify@gmail.com> --- pull: https://github.com/dlang/phobos/pull/5008 -- |
December 31, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 --- Comment #6 from Manu <turkeyman@gmail.com> --- (In reply to greenify from comment #5) > pull: https://github.com/dlang/phobos/pull/5008 Doesn't implement desired behaviour. -- |
December 31, 2016 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 --- Comment #7 from greenify <greeenify@gmail.com> --- > Doesn't implement desired behaviour. Fair enough - I tried to make it similar to `splitter` in `std.regex`, but it seems that even this didn't work out: "a..b.c".splitter!(Yes.keepSeparators)(regex("[.]")).writeln > ["a", ".", "", ".", "b", ".", "c"] "a..b.c".splitter!(Yes.keepSeparators)('.').writeln; > ["a", ".", ".", "b", ".", "c"] >From the example you posted, you want it to yield sth. like this, right? > ["a", ".", ".b", ".c"] And there's another common use case - though that one is simply splitter.filter!`a.empty`: > ["a", "b", "c"] However, at least the existing behavior for No.keepSeparators is the same: "a..b.c".splitter!(No.keepSeparators)(regex("[.]")).writeln > ["a", "", "b", "c"] "a..b.c".splitter!(No.keepSeparators)('.').writeln; > ["a", "", "b", "c"] -- |
July 18, 2020 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 Robert Aron <aronrobert293@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aronrobert293@gmail.com Assignee|nobody@puremagic.com |aronrobert293@gmail.com -- |
July 18, 2020 [Issue 16288] splitter() that doesn't eat sentinels | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=16288 --- Comment #8 from Manu <turkeyman@gmail.com> --- They are all interesting cases. I think splitter should be configurable like this. -- |
Copyright © 1999-2021 by the D Language Foundation