Skip to content

Commit

Permalink
Merge pull request #2386 from wilzbach/fix-18959
Browse files Browse the repository at this point in the history
Fix Issue 18959 - [Change Log: 2.079.0] substitute was added in std.algorithm.iteration but the changelog points to std.algorithm.searching
merged-on-behalf-of: Steven Schveighoffer <schveiguy@users.noreply.github.com>
  • Loading branch information
dlang-bot committed Jun 8, 2018
2 parents df63da0 + 45fb787 commit 9809dc9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions changelog/2.079.0.dd
Expand Up @@ -43,7 +43,7 @@ $(BUGSTITLE_TEXT_HEADER Library changes,
$(LI $(RELATIVE_LINK2 compile-time-format-optimized,`std.format` with strings passed during compile-time has been optimized))
$(LI $(RELATIVE_LINK2 fix18397,Changed `std.conv.hexString` to return an immutable string literal))
$(LI $(RELATIVE_LINK2 nullable-class,`Nullable!C.nullify` no longer calls .destroy when `C` is a class or interface))
$(LI $(RELATIVE_LINK2 std-algorithm-iteration-substitute,`std.algorithm.searching.substitute` was added))
$(LI $(RELATIVE_LINK2 std-algorithm-iteration-substitute,`std.algorithm.iteration.substitute` was added))
$(LI $(RELATIVE_LINK2 std-bigint-divmod,`divMod` was added to std.bigint.))
$(LI $(RELATIVE_LINK2 std-bigint-getDigit,`getDigit` Was Added To `std.bigint`))
$(LI $(RELATIVE_LINK2 std-exception-enforce,std.exception.enforce can now be used as an eponymous template to create your own enforce function))
Expand Down Expand Up @@ -918,15 +918,15 @@ class or interface instances, and the above code will now work correctly.
)
)

$(LI $(LNAME2 std-algorithm-iteration-substitute,`std.algorithm.searching.substitute` was added)
$(LI $(LNAME2 std-algorithm-iteration-substitute,`std.algorithm.iteration.substitute` was added)
$(P
$(REF substitute, std,algorithm,searching) yields a lazy range with
all occurrences of `substs` in `r` replaced with their substitution:
$(REF substitute, std,algorithm,iteration) yields a lazy range with
all occurrences of the substitution patterns in `r` replaced with their substitution:
)

---
import std.algorithm.comparison : equal;
import std.algorithm.searching : substitute;
import std.algorithm.iteration : substitute;

// substitute single elements
assert("do_it".substitute('_', ' ').equal("do it"));
Expand Down Expand Up @@ -957,7 +957,7 @@ template overload can be used:

---
import std.algorithm.comparison : equal;
import std.algorithm.searching : substitute;
import std.algorithm.iteration : substitute;

// substitute subranges of a range
assert("apple_tree".substitute!("apple", "banana",
Expand Down

0 comments on commit 9809dc9

Please sign in to comment.