It seems that string's find_last_not_of method isn't returning string::npos:
void test() { string s = " "; int i = s.find_last_not_of(' '); cout << "i = " << i << endl // prints -1 << "string::npos = " << string::npos << endl; } On g++ (Ubuntu 4.3.2-1ubuntu12) 4.3. I get this output: i = -1 string::npos = 4294967295 Is this a bug? Or am I mis-reading the documentation? _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus