Quantcast
Channel: All LoadRunner Practitioners Forum posts
Viewing all articles
Browse latest Browse all 12134

strtok is not splitting string here

$
0
0

<TD id="Name1" scope="row">MODAOTS_Change1</TD> this string I am splitting below loop

 

for(srvTraverse=1; srvTraverse<=193; srvTraverse++)
 {
  sprintf(outFlightParam, "{outFlightValD_%d}", srvTraverse);
  sprintf(outFlightParamVal, "%s", lr_eval_string(outFlightParam));

 

   token = (char *)strtok(outFlightParamValD, ">");
   token = (char *)strtok(NULL, ">");

 

    lr_output_message("%s%s",outFlightParamValD,token);
  
 }

I am getting output as : 1' scope='row'MODAOTS_Change1 , I only want MODAOTS_Change1 word over here, but using  spliting further

   token = (char *)strtok(token, "1' scope='row'");
   token = (char *)strtok(NULL, "1' scope='row'");

 

but I am not getting MODAOTS_Change1 name here, but getting output as: scope='row'1


Viewing all articles
Browse latest Browse all 12134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>