Table of Contents Previous topic Next topic
C++ COMPILER LIBRARY FUNCTIONS->String Class Functions->Member Functions->find
#include <string>
size_t find (const string& str, size_t pos = 0) const
Starting from pos, return the position of the first occurrence of the characters of str, or npos if no match is found.
size_t find (const char* s, size_t pos, size_t n) const
Starting from pos, return the position of the first occurrence of the characters of array of length n whose first element is s, or npos if no match is found.
size_t find (const char* s, size_t pos = 0) const
Starting from pos, return the position of the first occurrence of the characters of array of length strlen(s) whose first element is s, or npos if no match is found.
size_t find (char c, size_t pos = 0) const
Starting from pos, return the position of the first occurrence of the character c, or npos if no match is found.