indexOf

indexOf

> 功能

确定字符串 search 在字符串 string 中第一次出现的位置。

设置

#### 反馈

#### 例子

indexOf("Hello", "day") // 3 indexOf("Hello", "zzz") // -1 indexOf("Hello world", "we", 0) // 1 indexOf("Hello world", "we", 10) // 17