[][src]Function boa::builtins::string::index_of

pub fn index_of(
    this: &mut Value,
    args: &[Value],
    ctx: &mut Interpreter
) -> ResultValue

String.prototype.indexOf( searchValue[, fromIndex] )

The indexOf() method returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex.

Returns -1 if the value is not found.

More information: