• These functions search for the first/last substring that is equal to the characters of the C-string
cstr (starting at index idx).
• The find() functions search forward and return the first substring.
• The rfind() functions search backward and return the last substring.
• These functions return the index of the first character of the substring when successful or
string::npos if they fail.
• Note that passing a null pointer (nullptr or NULL) results in undefined behavior.