Three primitives provided for manipulating wchar strings in UCS-2 encoding are:
void VCSAgStrlcpyW (wchar *dst, const wchar *src, int size)
This primitive must be used by agents to perform string copy operations on wchar
arguments. The argument "size
" refers to the number of characters in the destination buffer "dst
." This helps prevent buffer overflow errors. The output contained in the buffer "dst
" may be truncated if the buffer is not large enough.
void VCSAgStrlcatW (wchar *dst, const wchar *src, int size)
This primitive must be used in the agents to perform a string concatenation operation of wchar
arguments. The argument "size
" refers to the number of characters in the destination buffer "dst
." This helps prevent buffer overflow errors. The output contained in the buffer "dst
" may be truncated if the buffer is not large enough.
int VCSAgSnprintfW (wchar *buffer, int size, const wchar
This primitive accepts a variable number of arguments and works like the C library function "vswprintf
," except that VCSAgSnprintfW
takes in the size of the output buffer "dst
" as an argument. The primitive stores only a maximum of "size
" number of characters in the output buffer "dst
." This helps prevent buffer overflow errors. The output contained in the buffer "dst
" may be truncated in the buffer is not large enough.