string::substr - C++ Reference
string substr (size_t pos = 0, size_t len = npos) const; Returns a newly constructed object with its value initialized to a copy of a substring of this object. The substring is the portion of the object that starts at character positionpos and spans len characters (or until the end of the string, whichever comes first).