跳至内容

StringFind

StringFind

在字符串中查找子字符串。

int  StringFind(
   string  string_value,        // string in which search is made
   string  match_substring,     // what is searched
   int     start_pos=0          // from what position search starts
   );

参数

string_value

[in] 要进行的搜索的字符串。

match_substring

[in] 要搜索的子字符串。

start_pos=0

[in] 从哪个位置开始搜索字符串。

返回值

返回子字符串在字符串中的起始位置,如果未找到子字符串则返回 -1。

最后更新于