Provide base_string conversion to std::string.
Mark substr as const.