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

PString PString::Mid ( PINDEX  start,
) const [inherited]

Extract a portion of the string into a new string. The original string is not changed and a new unique reference to a string is returned.

A substring from the start# position for the number of characters specified is extracted.

If len# is greater than the length of the string from the start# position then all characters to the end of the string are returned.

If start# is greater than the length of the string or len# is zero then an empty string is returned.

substring of the source string.
startStarting position of the substring.
lenNumber of characters to extract.

Definition at line 1836 of file contain.cxx.

References PString::Empty(), and PString::operator()().

Referenced by PRegularExpression::EscapeString(), PFilePath::GetFileName(), PHTTPRadioField::GetHTMLInput(), PHTTPBooleanField::GetHTMLInput(), PHTTPField::GetHTMLInput(), PPOP3Client::GetMessageSizes(), PDirectory::GetPath(), PHTTPConfigSectionList::OnLoadedText(), PHTTPForm::OnLoadedText(), PPOP3Client::OnOpen(), PSMTPServer::OnSendMail(), PVideoDevice::OpenFull(), PArgList::Parse(), PIpAccessControlEntry::Parse(), PInternetProtocol::ParseResponse(), PPOP3::ParseResponse(), PHTTP::ParseResponse(), PHTTPConfigSectionList::Post(), PPOP3Server::ProcessCommand(), PInternetProtocol::ReadCommand(), PInternetProtocol::ReadResponse(), PRemoteConnection::SetConfiguration(), PHTTPCompositeField::SetName(), and PSTUNClient::SetServer().

  if (len <= 0 || start < 0)
    return Empty();

  if (start+len < start) // Beware of wraparound
    return operator()(start, P_MAX_INDEX);
    return operator()(start, start+len-1);

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