CString::Find

编辑本段作用

在一个较大的字符串中查找字符或子字符串

int Find( TCHAR ch ) const;

int Find( LPCTSTR lpszSub ) const;

int Find( TCHAR ch, int nStart ) const;

int Find( LPCTSTR lpszSub, int nStart ) const;

编辑本段返回值

返回此CString对象中与需要的子字符串或字符匹配的第一个字符的从零开始的索引;如果没有找到子字符串或字符则返回-1。

编辑本段参数

ch 要搜索的单个字符。

lpszSub 要搜索的子字符串。

nStart 字符串中开始搜索的字符的索引,如果是0,则是从头开始搜索。如果nStart不是0,则位于nStart之前的字符不包括在搜索之内。

pstr 指向要搜索的字符串的指针

相关文章:

  • 2021-08-30
  • 2021-05-28
  • 2022-12-23
  • 2021-11-21
  • 2021-11-21
  • 2021-06-22
  • 2021-11-08
猜你喜欢
  • 2022-01-19
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2021-12-12
  • 2021-06-27
  • 2021-07-21
相关资源
相似解决方案