是的,它是
substr方法:
basic_string substr( size_type pos = 0, size_type count = npos ) const;
返回子字符串[pos,pos + count)。如果请求的子字符串超出了字符串的末尾,或者如果count ==
npos,则返回的子字符串为[pos,size())。
例
#include <iostream>#include <string>int main(void) { std::string text("Apple Pear Orange"); std::cout << text.substr(6) << std::endl; return 0;}看到它运行



