Concatenates a specified number of strings into a STRING_BUFFER structure.
#include <smsutapi.h> STRING NWSMCatStrings ( UINT8 numStrings, STRING_BUFFER **dest, void *src1, void *src2, ...);
(IN) Specifies the number of source strings to concatenate.
(OUT) Points to the buffer to receive the concatenated strings.
(IN) Points to the first string to concatenate.
(IN) Points to the second string to concatenate.
(IN) Points to other strings to concatenate.
The following table lists the return values associated with the function.
NOTE:This function is supported only for backward compatibility, the NWSMCatGenericStrings function can be used instead of this, as it provides the same functionality.
To free the string, call NWSMFreeString.
If dest is NULL, NWSMCatStrings allocates memory for the string. If dest.string is too small to contain the concatenated strings, NWSMCatStrings frees the memory and allocates a new structure with more memory.
#include <smsutapi.h> STRING resultString; UINT8 numStrings = 2; STRING_BUFFER *dest = NULL; char *destString = “/home/user/dir1”, *src1 = “dir1”, *src2 = “*.c”; UINT16 destLen; destLen = strlen(destString); dest = (STRING_BUFFER *)malloc(sizeof(STRING_BUFFER) + destLen); dest->size = destLen + 1; strcpy(dest->string, destString); resultString = NWSMCatStrings(numStrings, &dest, src1, src2);