I understand that npos is the greatest value of size_t  but It's common practice to use "!=" to compare with string::npos.