Appends a specified number of characters to a string.
#include <smsutapi.h> STRING NWSMCatString ( STRING_BUFFER **dest, void *source, INT16 srcLen);
(IN/OUT) Points to the string to append.
(IN) Points to the string to append to the end of dest.
(IN) Specifies the length of source.
The following table lists the return values associated with the function.
NOTE:This function is supported only for backward compatibility, the NWSMCatGenericString function can be used instead of this, as it provides the same functionality.
To free the string, call NWSMFreeString.
If dest is NULL, NWSMCatString allocates memory for the string. If dest.string is too small to contain the concatenated strings, NWSMCatString frees the memory and allocates a new structure with more memory.
If srcLen is set to -1, NWSMCatString calculates the length of source.
#include <smsutapi.h> STRING resultString; STRING_BUFFER *dest = NULL; char *source = “*.exe”, *destString = “/home/user/dir1”; INT16 srcLen = -1; UINT16 destLen; destLen = strlen(destString); dest = (STRING_BUFFER *)malloc(sizeof(STRING_BUFFER) + destLen); dest->size = destLen + 1; strcpy(dest->string, destString); resultString = NWSMCatString(&dest, source, srcLen);