Skip to content

Commit

Permalink
Add regex splitter changes in the change log
Browse files Browse the repository at this point in the history
  • Loading branch information
JackStouffer committed May 9, 2016
1 parent ca28df4 commit 9824066
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions changelog.dd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ $(BUGSTITLE Library Changes,
`std.range.padRight` were added.))
$(LI $(RELATIVE_LINK2 regex-multiple-patterns, `std.regex.regex` now
supports matching multiple patterns in one go.))
$(LI $(RELATIVE_LINK2 regex-with-matches, `std.regex.splitter` now
supports keeping the pattern matches in the resulting range.))
$(LI $(RELATIVE_LINK2 optimization, `findLocalMin` was added to `std.numeric`.))
$(LI $(RELATIVE_LINK2 slice_ptr, `ptr` property and public constructor were
added to `std.experimental.ndslice.slice.Slice`.))
Expand Down Expand Up @@ -98,6 +100,22 @@ assert(m.front[1] == "12");
-------
)

$(LI $(LNAME2 regex-with-matches, $(XREF regex, splitter) now supports keeping the
pattern matches in the resulting range.)
-------
import std.regex;
import std.algorithm.comparison : equal;

auto pattern = regex(`([\.,])`);
assert("2003.04.05"
.splitter!(No.keepSeparators)(pattern)
.equal(["2003", "04", "05"]));
assert("2003.04.05"
.splitter!(Yes.keepSeparators)(pattern)
.equal(["2003", ".", "04", ".", "05"]));
-------
)

$(LI $(LNAME2 optimization, `findLocalMin` was added to `std.numeric`.)
$(P $(REF findLocalMin, std,numeric) finds a real minimum of a real function `f(x)` via bracketing.)
-------
Expand Down

0 comments on commit 9824066

Please sign in to comment.