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

PINDEX PString::FindLast ( char  ch,
) const [inherited]

Locate the position of the last matching character.

chCharacter to search for in string.
offsetOffset into string to begin search.

Definition at line 1984 of file contain.cxx.

References PString::GetLength().

Referenced by PString::FindLast(), PFilePath::GetDirectory(), PFilePath::GetFileName(), PDynaLink::GetName(), PFilePath::GetPath(), PFilePath::GetTitle(), PFilePath::GetType(), and PFilePath::SetType().

  PINDEX len = GetLength();
  if (len == 0 || offset < 0)
    return P_MAX_INDEX;
  if (offset >= len)
    offset = len-1;

  while (InternalCompare(offset, ch) != EqualTo) {
    if (offset == 0)
      return P_MAX_INDEX;

  return offset;

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index