int StringFind(string text, string matchec, int start=0)
Search for a substring. Returns the position in the string from which the
searched substring begins, or -1 if the substring has not been found.
部分文字列を検索します。返される文字列の中の位置は、検索した部分文字列の開始位置、もしくは、見つからない場合は -1 になります。
Parameters:
パラメータ:
text - String to search in.
中を検索する文字列。
matched_text - Substring to search for.
検索する部分文字列。
start - Position in the string to start search from.
検索を開始する、文字列内の位置。
Sample:
サンプル:
string text="The quick brown dog jumps over the lazy fox";
int index=StringFind(text, "dog jumps over", 0);
if(index!=16)
Print("oops!");
|