chsvlib
chsv helper source code

◆ Printf_s()

int Chusov::String::Printf_s ( const CHAR_TYPE *restrict  pszFormat,
  ... 
)
noexcept

Resolves to PrintfA_s or to PrintfW_s depending on the template parameter.

Template Parameters
CHAR_TYPEis a template parameter specifying a type of strings the template specialization is to work with. That is CHAR_TYPE=char for multibyte strings in the current locale or CHAR_TYPE=wchar_t for wide strings. The corresponding functions, wrapped over by the template specializations, are PrintfA_s and PrintfW_s.
Parameters
[in]pszFormatis a pointer to a zero terminated string defining how to interpret data, passed as additional parameters, during the construction of the output.
...constitute an optional set of additional parameters to build the formatted output according to pszFormat.
Returns
On success the function returns a number of characters of the output not counting the terminating zero. If an output, encoding or runtime constraint violation error occurs the function returns a negative value.

See PrintfA_s and PrintfW_s for the details.