Method has_value()
- Method
has_value
inthas_value(stringhaystack,stringvalue)
inthas_value(stringhaystack,intvalue)
inthas_value(array|mapping|object|programhaystack,mixedvalue)- Description
Search for
valueinhaystack.- Returns
Returns
1ifvalueis in the value domain ofhaystack, or0(zero) if not found.This function is in all cases except when both arguments are strings equivalent to (but sometimes faster than):
search(values(haystack), value) != -1If both arguments are strings, has_value() is equivalent to:
search(haystack, value) != -1- See also
has_index(), indices(), search(), has_prefix(), has_suffix(), values(), zero_type()