Concatenates a specified number of strings into a STRING_BUFFER structure.
#include <smsutapi.h> void* NWSMCatGenericStrings ( UINT32 nameSpaceType, UINT8 numStrings, STRING_BUFFER **dest, void *src1, void *src2,...);
(IN) Specifies the name space type of the source and destination strings (see nameSpaceType Values).
(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.
NWSMCatGenericStrings supports strings in UTF-8 format and mult-byte formatting.
To free the string, call NWSMFreeString.
If dest is NULL, NWSMCatGenericStrings allocates memory for the string. If dest.string is too small to contain the concatenated strings, NWSMCatGenericStrings 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);