find_last_of
提供:cppreference.com
Syntax:
#include <string> size_type find_last_of( const string& str, size_type index = npos ) const; size_type find_last_of( const charT* str, size_type index = npos ) const; size_type find_last_of( const charT* str, size_type index, size_type num ) const; size_type find_last_of( charT ch, size_type index = npos ) const;
find_last_of()関数は、次の動作をします。
- 現在の文字列の"index"番目から逆に検索し、"str"内の文字列にマッチする最初文字の位置を返します。見つからなかったら"string::npos"を返します。
- 現在の文字列の"index"番目から"num"文字の範囲を逆に検索し、"str"内の文字列にマッチする最初の文字の位置を返します。見つからなかったら"string::npos"を返します。
- 現在の文字列の"index"番目から逆に検索し、"ch"とマッチする最初の文字の位置を返します。見つからなかったら"string::npos"を返します。
Related Topics: find, find_first_not_of, find_first_of, find_last_not_of, rfind