14 string::size_type position = input.find_first_not_of(
" \t\n");
15 if ( position == std::string::npos )
return;
16 input.erase(0, position);
17 position= input.find_last_not_of(
" \t\n");
18 if ( position != std::string::npos)
19 input.erase( position+1 );
23 split (
const string& input,
string& first,
string& second) {
25 string::size_type position = input.find_first_of(
" \t\n");
26 if ( position==std::string::npos ) {
30 first = input.substr( 0, position );
31 second = input.substr( position+1, input.size()-position );
33 position= second.find_first_not_of(
" \t\n");
34 second.erase(0, position);