Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PINDEX PString::FindRegEx ( const PRegularExpression regex,
PINDEX  offset = 0 
) const [inherited]

Locate the position within the string of one of the regular expression. The search will begin at the character offset provided.

If offset# is beyond the length of the string, then the function will always return P_MAX_INDEX#.

position of regular expression in the string, or P_MAX_INDEX if no characters from the set are in the string.
regexregular expression to find
offsetOffset into string to begin search.

Definition at line 2054 of file contain.cxx.

Referenced by PHTTPBooleanField::GetHTMLInput(), PHTTPForm::OnLoadedText(), PPOP3Client::OnOpen(), PVideoInputDevice_V4L::Open(), and PHTTPForm::Post().

  if (offset < 0)
    return P_MAX_INDEX;

  PINDEX pos = 0;
  PINDEX len = 0;
  if (FindRegEx(regex, pos, len, offset))
    return pos;

  return P_MAX_INDEX;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index