Logo Search packages:      
Sourcecode: pwlib version File versions

PString & PString::sprintf ( const char *  cfmt,
  ... 
) [inherited]

Concatenate a formatted output to the string. This is identical to the standard C library sprintf()# function, but appends its output to the string.

This function makes the assumption that there is less the 1000 characters of formatted output. The function will assert if this occurs.

Note that this function will break the current instance from multiple references to the string. A new string buffer is allocated and the data from the old string buffer copied to it.

Returns:
reference to the current string object.
Parameters:
cfmt  C string for output format.

Definition at line 2447 of file contain.cxx.

References PString::vsprintf().

Referenced by PPOP3Client::LogIn(), PRFC822Channel::MultipartMessage(), PSystemLog::Output(), PString::PString(), and PString::ToLiteral().

{
  va_list args;
  va_start(args, fmt);
  return vsprintf(fmt, args);
}


Generated by  Doxygen 1.6.0   Back to index