メソッド Type method
文字列.indexOf(検索文字列,検索開始位置) Format string. IndexOf (search string, position search)
Commentary
文字列を検索します。 Search for string. 検索開始位置は省略することができます。 Find the starting position can be omitted. 省略した場合は文字列の最初から検索します。 If you omit the search string from the beginning. 検索結果は文字列がみつかった位置を示します。 Results indicate the position MITSUKATTA string. 見つからなかった場合は-1を返します。 If not found returns -1.
サンプルコード Sample code
str = "Sample"; str = "Sample";
n = str.indexOf("m"); n = str.indexOf ( "m");
outputs[0] = n; outputs [0] = n;