二級(jí)考試C++函數(shù):find_first_of函數(shù)

字號(hào):

find_first_of
    語(yǔ)法: size_type find_first_of( const basic_string &str, size_type index = 0 );
    size_type find_first_of( const char *str, size_type index = 0 );
    size_type find_first_of( const char *str, size_type index, size_type num );
    size_type find_first_of( char ch, size_type index = 0 );
    find_first_of()函數(shù):
    查找在字符串中第一個(gè)與str中的某個(gè)字符匹配的字符,返回它的位置。搜索從index開始,如果沒(méi)找到就返回string::npos
    查找在字符串中第一個(gè)與str中的某個(gè)字符匹配的字符,返回它的位置。搜索從index開始,最多搜索num個(gè)字符。如果沒(méi)找到就返回string::npos,
    查找在字符串中第一個(gè)與ch匹配的字符,返回它的位置。搜索從index開始。