What is std::string :: NPOS?

std::string::npos npos is a static member constant value with the greatest possible value for an element of type size_t . This value, when used as the value for a len (or sublen) parameter in string’s member functions, means “until the end of the string”. As a return value, it is usually used to indicate no matches.

Read more