RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WideString::cat_sprintf Method

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

Pascal
function cat_sprintf(const format: wchar_t*; : ...): WideString&; cdecl;
C++
__cdecl WideString& cat_sprintf(const wchar_t* format, ...);

Use cat_System::WideString::cat_sprintf to append to the value of the System::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 an System::WideString with the value

Dear Mr. Smith,

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

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!