Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/TCString
Description
Format to a destination buffer. Similar to vsnprintf.
Writes the formatted output to Dest, up to a maximum of DestSize-1 characters, excluding the null terminator. Content of Dest is undefined when the return value is outside of the range [0, DestSize). A return value is calculated even when DestSize is 0, in which case Dest may be null. A null terminator is always written unless DestSize is 0. Success is indicated by ReturnValue >= 0 && ReturnValue < DestSize.
hs is always treated as UTF-8. ls is always treated as UTF-16. s is treated as UTF-8 for narrow format strings and UTF-16 for wide format strings.
| Name | FormatV |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/CString.h |
| Include Path | #include "Misc/CString.h" |
static int32 FormatV
(
CharType * Dest,
SIZE_T DestSize,
const CharType * Format,
va_list Args
)
Number of characters, excluding the null terminator, that would be written to Dest if DestSize was ignored, or -1 on error.
Parameters
| Name | Remarks |
|---|---|
| Dest | Pointer to the destination buffer to write to. |
| DestSize | Maximum number of characters to write to Dest, including the null terminator. |
| Format | Format string with which to format the output. |
| Args | Arguments containing the data referenced by the format string. |