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.
regex  regular expression to find
offset  Offset into string to begin search.

Definition at line 2054 of file contain.cxx.

Referenced by PPOP3Client::OnOpen().

  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;

Generated by  Doxygen 1.6.0   Back to index