> return ( first==std::str ing::npos ) > ? std::string() > : str.substr(firs t, str.find_last_n ot_of(sepSet)-first+1); > } > > Sample usage: > string name = trimmed( userInput, " \t" ); // trip spaces and tabs > > > Not sure if this is what you were looking...