In CPP primer, the find method returns a special value named string: NPOs, indicating that the search does not match. Stick on for memory.
TheStringClass provides six search functions, each named as a variantFind. The operations all returnString: size_typeValue that is the index of where the match occurred, or a special value namedString: NPOsIf there is no match.StringClass definesNPOsAs a value that is guaranteed to be greater than any valid index.
The string class provides six search functions, each of which is named in different forms of find. All these operations return values of the string: size_type type. The following mark is used to locate the matched position. Alternatively, a special value named string: NPOs is returned, indicating that no matching is found. The string class defines NPOs as a value that must be greater than any valid lower-level value.
For example:
String STR;
Pos = Str. find_first_of ("H ");
If (Pos! = String: NPOs)
{..
....
}