C++ examples for STL:string
Get Substrings
#include <iostream> #include <string> int main(int argc, const char* argv[]) { std::string string1("this is a test this is a test."); std::cout << string1.substr(7, 5) << std::endl; return 0;/*from w w w . j a va 2 s .c o m*/ }