|
我还曾这样改过代码:
char *str1;
char * token;
char * tokeny;
char sepA[] = "\r\n";
char sepB[] = " ";
Action()
{
lr_save_string("\r\n \r\n 52581\r\n \r\n \r\n ","str");
token = (char *)strtok(lr_eval_string("{str}"), sepA);
while (token != NULL ) { // While valid tokens are returned
lr_output_message ("%s", token );
tokeny=(char *)strtok(token, sepB);
if (tokeny!=NULL) {
lr_output_message ("%s", tokeny );
}
token = (char *)strtok(NULL, sepA); // Get the next token
}
return 0;
}
可结果只运行了一次就结束了,lr_output_message ("%s", token )返回的结果是空,而且lr_output_message ("%s", tokeny ); 没有打印任何东东 |
|