found value plus one is returned.
among
fn
uint among(alias pred = (a, b) => a == b, Value, Values...)(Value value, Values values) if (Values.length != 0)Find value _among values, returning the 1-based index of the first matching value in values, or 0 if value is not _among values. The predicate pred is used to compare values, and uses equality by default.
Parameters
pred | The predicate used to compare the values. |
value | The value to search for. |
values | The values to compare the value to. |
Returns
0 if value was not found among the values, otherwise the index of the
See Also
findandcanFindfor finding a value in a range.value in iota(start, end)to find a value ina particular interval.