01、string字符串『训练集』

一、string成员函数Big Five

  • 1)子串:string substr( int pos=0, int Len= string::npos ) const ;
  • 2)查找位置:
    • int rfind( const char * s, int pos= string::npos ) const ;
    • int rfind( const string &s , int pos= string::npos ) const;
  • 3)删除『返回本身』:string & erase( int pos=0, int Len= string::npos ) ;
  • 4)插入『返回本身』:
    • string & insert( int pos, const char *s )
    • string & insert( int pos, string & s )
  • 5)替换『返回本身』:
    • string & replace( int pos, int Len, const char * s );
    • string & replace( int pos, int Len, const string & s );

二、训练集

二次训练STL 文章被收录于专栏

这是一个分类专栏,仅做快速记录

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务