strcat

String Manipulation Functions

Concatenates two strings.

char *strcat( char *to, const char *from );

toThe string at the end of which the from string is concatenated.
fromThe string concatenated to the end of the to string.

Return Values

Pointer to the concatenated string (null-terminated).

Example

The following example uses strcat to append a backslash to the directory name, fullpath. It then appends filename to fullpath.

    #include <string.h>
    char fullpath[1024], * filename = "logfile.txt";
    strcpy(fullpath, "c:\\tmp");
    strcat(fullpath, "\\");
    strcat(fullpath, filename);
    lr_output_message ("Full path of file is %s", fullpath);
Example: Output:
Action.c(9): Full path of file is c:\tmp\logfile.txt