Rexx-pos
提供:Dev Guides
Rexx-pos文字列
このメソッドは、ある文字列の別の文字列内の位置を返します。
構文
pos(substr,string1)
パラメーター
- string1 -ソース文字列。
- substr -メイン文字列で検索するサブ文字列。
戻り値
このメソッドは、ある文字列の別の文字列内の位置を返します。
例
/*Main program*/
a = "Hello World"
say pos("Hello",a)
上記のプログラムを実行すると、次の結果が得られます。
出力
1