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

string str = "hello";
str.substr(0,2);    //输出"he", 表示[0,2)
原文地址:https://www.cnblogs.com/friedCoder/p/12309179.html