among

fnuint 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

predThe predicate used to compare the values.
valueThe value to search for.
valuesThe values to compare the value to.

Returns

0 if value was not found among the values, otherwise the index of the

found value plus one is returned.

See Also