lrt_strcpy
| Buffer Manipulation Functions |
Copies the source character string to the destination string.
void lrt_strcpy( char *destString, const char *sourceString );
| destString | Destination for string copy. |
| sourceString | Source string. |
The lrt_strcpy function copies the specified string from the source to the destination. The source is saved in a parameter before it is copied to the destination. This function is the same as the C function (strcpy).
The lrt_strcpy function is provided in case the C function (strcpy) is not found on the user's machine. Since we use a C interpreter, we can't assume that the standard C library is found on each user's machine.
Return Values
The function is declared as void, so it does not return anything.
Parameterization
The following argument(s) can be parameterized using standard parameterization: sourceString
Example
In the following example, the lrt_strcpy function copies a string to its destination, data_0.
vuser_init()
{
char* data_0;
char* data_1;
long buflen;
int cd;
char string[] = "This is a string.";
data_0 = lrt_tpalloc("STRING", "", sizeof(string));
// Send a request, but cancel it afterwards
lrt_strcpy(data_0, string);
cd = lrt_tpacall("TOUPPER", data_0, 0, 0);
lrt_tpcancel(cd);
// Send a request, and look at reply
data_1 = lrt_tpalloc("STRING", "", 1024);
lrt_tpgetrply(&cd, &data_1, &olen, 0);
buflen = lrt_tptypes(data_1, type, NULL);
lr_output_message("The reply buffer type is %s, size is %lu.", type, buflen);
return 0;

