contain.inl File Reference


Functions

PINLINE PString operator+ (const char *cstr, const PString &str)
PINLINE PString operator+ (char c, const PString &str)
PINLINE PString operator & (const char *cstr, const PString &str)
PINLINE PString operator & (char c, const PString &str)
PINLINE PString pvsprintf (const PString &fmt, va_list args)

Function Documentation

PINLINE PString operator & ( char  ch,
const PString str 
)

Concatenate a PString to a single character to produce a third. The original string is not modified, an entirely new unique reference to a string is created. The c# parameter is typically a literal, eg: {verbatim} myStr = '!' & aStr; {verbatim}

This function differes from operator+# in that it assures there is at least one space between the strings. Exactly one space is added if there is not a space at the end of the first or beggining of the last string.

Returns:
new string with concatenation of the object and parameter.
Parameters:
ch  Character to be concatenated to.
str  String to concatenate.

PINLINE PString operator & ( const char *  cstr,
const PString str 
)

Concatenate a PString to a C string to produce a third. The original string is not modified, an entirely new unique reference to a string is created. The cstr# parameter is typically a literal string, eg: {verbatim} myStr = "fred" & aStr; {verbatim}

This function differes from operator+ in that it assures there is at least one space between the strings. Exactly one space is added if there is not a space at the end of the first or beggining of the last string.

Returns:
new string with concatenation of the object and parameter.
Parameters:
cstr  C string to be concatenated to.
str  String to concatenate.

PINLINE PString operator+ ( char  c,
const PString str 
)

Concatenate a PString to a single character to produce a third. The original string is not modified, an entirely new unique reference to a string is created. The c# parameter is typically a literal, eg: {verbatim} myStr = '!' + aStr; {verbatim}

Returns:
new string with concatenation of the object and parameter.
Parameters:
c  Character to be concatenated to.
str  String to concatenate.

PINLINE PString operator+ ( const char *  cstr,
const PString str 
)

Concatenate a PString to a C string to produce a third. The original string is not modified, an entirely new unique reference to a string is created. The cstr# parameter is typically a literal string, eg: {verbatim} myStr = "fred" + aStr; {verbatim}

Returns:
new string with concatenation of the object and parameter.
Parameters:
cstr  C string to be concatenated to.
str  String to concatenate.

PINLINE PString pvsprintf ( const PString fmt,
va_list  args 
)

Produce formatted output as a string. This is identical to the standard C library vsprintf()# function, but sends its output to a PString#.

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:
fmt  String for output format.
args  Extra parameters for sprintf()# call.


Generated on Mon Feb 23 01:57:55 2009 for PTLib by  doxygen 1.5.1