From 0b6bfd5aa73ef134659f21d36e7f1b7f0d2cfe5f Mon Sep 17 00:00:00 2001 From: "H. S. Teoh" Date: Thu, 18 Sep 2014 13:02:43 -0700 Subject: [PATCH] Cross-reference `among` from `canFind`. For newbies' ease of discovering the right function to use (issue 13467). --- std/algorithm.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/std/algorithm.d b/std/algorithm.d index 0d62bc01065..4dc46531132 100644 --- a/std/algorithm.d +++ b/std/algorithm.d @@ -11477,6 +11477,9 @@ unittest /++ Convenience function. Like find, but only returns whether or not the search was successful. + +See_Also: +$(XREF algorithm, among) for checking a range against multiple possibilities. +/ template canFind(alias pred="a == b") { @@ -13718,7 +13721,8 @@ is not _among $(D values). The predicate $(D pred) is used to compare values, and uses equality by default. See_Also: -$(XREF algorithm, find) for finding a value in a range. +$(XREF algorithm, find) and $(XREF algorithm, canFind) for finding a value in a +range. */ uint among(alias pred = (a, b) => a == b, Value, Values...) (Value value, Values values)