理论上来说是s2=s,substr(start+1,s.size()-start()-1);但根据substr函数的特点,超过字符串长度的部分会只拷贝到字符串结尾,所以楼主是对的,你也是对的。
点赞

相关推荐

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