Allocates a string buffer and initializes it according to the specified format string and the argument list.
- Template Parameters
-
- Parameters
-
[in] | ap | is a variable-argument list. It contains a list of the input data for the string parser according to the format string. |
[in] | lpszFormat | is a zero-terminated string specified in the current locale giving the format of the output string. The format is specified according to the specification of the PrintfA_s function for CHAR_TYPE=char and of the PrintfW_s function for CHAR_TYPE=wchar_t. |
- Returns
- On success the function returns a pointer to the allocated and initialized string according to the format specified by the parameters. The returned string buffer must be freed using one of the free functions defined in the Chusov::Memory or Chusov::String namespaces. On failure the function returns NULL. Use the GetLastChsvError function to get extended error information.
- See also
- AllocateString;
FreeString;
SecureFreeString;
AllocateAndFormatString;
AllocateAndFormatStringByTags.