If "-" is not found, std::string::npos will be returned, and then the loop will break.