Houdini 20.0 Nodes VOP nodes

Array Find Index VOP node

Finds the first location of an item in an array or string.

Since 16.0

Returns the location of the search term in the string or array.

If it cannot be found, it returns -len(array)-1. You should test for failure by testing to see if negative. This result is chosen to ensure indexing with a failed find can be detected as an error. (-1 would refer to the last element).

An empty string is never found in a string. This differs from Python where empty strings are found at the start of the string.

The stop and end values constrain the search to those ranges. The end index is not included in the search, so should be len(array) to search the entire array. The start index is included.

Negative indices are not supported for the find range.

See also

VOP nodes