将多个参数转存为数组 strcat

上一篇 / 下一篇  2016-07-08 15:57:06 / 个人分类:性能测试

int i,count;
char hotelID[10];
char hotelIDs[2000]="";

web_reg_save_param("param_hotelID",
"LB=\"datelessSearch\":false,\"hotelId\":\"",
"RB=\",\"hotelName\"",
           "ORD=All",
   "NOTFOUND=warning",
LAST);
//。。。省略http request


count = atoi(lr_eval_string("{param_hotelID_count}"));
//lr_output_message("count is %d",count);

for (i=count; i>1; i--) {

sprintf(hotelID, "{param_hotelID_%i}",i);
lr_save_string(lr_eval_string(hotelID),"param_hotelID"); 

strcat(hotelIDs,lr_eval_string("{param_hotelID}"));
strcat(hotelIDs,",");

}

strcat(hotelIDs,lr_eval_string("{param_hotelID_1}"));
lr_save_string(hotelIDs,"hotelID_All");

TAG:

fhhh_eyou的个人空间 引用 删除 fhhh_eyou   /   2016-07-09 13:45:33
1
 

评分:0

我来说两句

Open Toolbar