System.WideString.cat_sprintf

From RAD Studio API Documentation
Jump to: navigation, search


C++

WideString& __cdecl     cat_sprintf(const wchar_t* format, ...); // Returns *this

Properties

Type Visibility Source Unit Parent
function public wstring.h System WideString

Description

Appends the result of a given format string and its arguments to the end of the WideString.

Use cat_cat_sprintf to append to the value of the WideString, given a standard C++ format specifier. Pass the values to any arguments in the format specifier as additional parameters following the format parameter.

For example, the following code:

WideString Salutation = "Mr."
WideString s = "";
s.cat_sprintf("Dear %s ", Salutation);
s.cat_sprintf("%s,", "Smith");

results in a WideString with the value

Dear Mr. Smith,

This method returns a reference to the WideString (*this) with the resulting value.

See Also