Char*strcat (char*to,constchar*from); appends a string to another string
Example:
Lr_save_datetime ("Today is%m month%d day%y", Date_now, "Today");
//output: Today = today is March 11 2016
Lr_save_datetime ("Tomorrow is%m month%d%y year", Date_now+one_day, "Tomorrow");
//output: tomorrow = Tomorrow is March 12 2016
strcat (temp,lr_eval_string ("{Today}"));//Append the value of the variable today to the end of Temp
lr_message ("temp=%s", Temp);//output: Temp=today is March 11 2016
strcat (Temp,lr_eval_string ("{Tomorrow}")); //Append the value of the variable today to the end of temp
Lr_message ("temp=%s", Temp);
Output: Temp=today was March 11 2016 tomorrow is March 12 2016
Do you see it.
Another example of a string intercept function + string concatenation function:
Char *papernum;
Char *year;
Char *month;
Char *day;
Char birthdate[200];
Char *str;
Save 441301198005059899 to Variable Papernum
Lr_save_string ("441301198005059899", "Papernum");
To intercept a year in a variable papernum
Lr_save_var (Lr_eval_string ("{papernum}") +6,4,0, "year");
Capturing the month in a variable papernum
Lr_save_var (Lr_eval_string ("{papernum}") +10,2,0, "month");
Intercept the date in the variable Papernum
Lr_save_var (Lr_eval_string ("{papernum}") +12,2,0, "Day");
Save-to Variable str
Lr_save_string ("-", "str");
strcat (Birthdate,lr_eval_string ("{year}");
strcat (birthdate,lr_eval_string ("{str}"));
strcat (Birthdate,lr_eval_string ("{Month}"));
strcat (birthdate,lr_eval_string ("{str}"));
strcat (Birthdate,lr_eval_string ("{Day}"));
Lr_message ("birthdate=%s", birthdate);//Last Output: birthdate=1980-05-05
the strcat () is used above, and the function can also be nested by continuous nesting, shorthand, as follows:
Strcat (strcat (strcat (strcat (strcat ("{year}"), Birthdate,lr_eval_string ("{str}"), lr_eval_string ("{Month}"), Lr_eval_string ("{str}"), Lr_eval_string ("{Day}"));
Do you see it. If you don't understand Lr_save_var (); function, see my other blog:LoadRunner How to use Lr_save_var to intercept arbitrary string lengths
I hope to be of some help to you.