stringPosition()

概要

サブストリングが開始される文字列内の位置を返します。サブストリングが見つからない場合、この関数は 0 を返します。

構文

stringPosition ( str As String, subString As String ) As Integer 
引数 [タイプ] 説明
str 文字列 検索対象の文字列です。
subString 文字列 検索する文字のサブストリングです。

例 1

Intent >stringPosition("Three big dogs are chasing", "dog")
--> 11 

例 2

Intent >stringPosition("Two small cats", "dog")
--> 0