C++中的字符串切片操作

string str = "hello";
str.substr(0,2);    //输出"he", 表示[0,2)
posted @ 2020-02-14 19:32  friedCoder  阅读(5574)  评论(0编辑  收藏  举报