码迷,mamicode.com
首页 > 移动开发 > 详细

c++ std::string::append函数

时间:2019-06-20 15:33:11      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:size   end   pch   code   append   pre   sub   c++   函数   

string& append (const string& str);
string& append (const string& str, size_t subpos, size_t sublen);   
string& append (const char* s);
string& append (const char* s, size_t n);
string& append (size_t n, char c);

/*
std::string stra("helloworld");
std::string str;
str.append(stra);
str.append(stra,0,5);
*/

/*
char pch[15]="helloworld";
std::string str;
str.append(pch);
str.append(pch,5);
*/

/*
std::string str;
str.append(5,'c');
*/

c++ std::string::append函数

标签:size   end   pch   code   append   pre   sub   c++   函数   

原文地址:https://www.cnblogs.com/smallredness/p/11058949.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!