控制abc后面的第几个字符:
控制字符长度:
总结:
实际应用:
Action() { int i =0,j=0; char *tt_url = lr_eval_string("{tt_url}"); int len= strlen(tt_url); lr_output_message("%s",lr_eval_string("tt_url={tt_url}")); while(tt_url[i]!='='){i++;} while(tt_url[j]!='&'){j++;} lr_save_searched_string(tt_url,len,0,"serialNo",1,j-i-1,"serialNo"); lr_output_message("%s",lr_eval_string("serialNo={serialNo}")); i++; j++; while(tt_url[i]!='='){i++;} while(tt_url[j]!='&'){j++;} lr_save_searched_string(tt_url,len,0,"serviceID",1,j-i-1,"serviceID"); lr_output_message("%s",lr_eval_string("serviceID={serviceID}")); i++; j++; while(tt_url[i]!='='){i++;} while(tt_url[j]!='&'){j++;} lr_save_searched_string(tt_url,len,0,"nodeID",1,j-i-1,"nodeID"); lr_output_message("%s",lr_eval_string("nodeID={nodeID}")); i++; j++; while(tt_url[i]!='='){i++;} while(tt_url[j]!='&'){j++;} lr_save_searched_string(tt_url,len,0,"dealID",1,j-i-1,"dealID"); lr_output_message("%s",lr_eval_string("dealID={dealID}")); return 0; }
Action() { char cBuff[] = "abc Emma Woodhouse abc Elizabeth Bennet abc William Price"; // lr_save_string("/iwflow/FindJspID.jsp?serialNo=2008092200000033&serviceID=0099&nodeID=140004&dealID=2008092200000056&hisFlag=0&skillID=020401","tt_url"); lr_save_searched_string(cBuff, strlen(cBuff),2, "abc", 1,4,"test"); lr_output_message("%s",lr_eval_string("哈哈test={test}")); return 0; }