VUGen Code Snippet for stripping out new line characters

I should build a function library for VUGEN so I can reuse these everywhere I go, as I often find myself having to redo these. Anyhow this bit of code will strip out newline characters and rebuild the string so it is new line character free.


char * token;
char separators[]="\n";
char chsso_token[1024];

Action()
{

token = (char *)strtok(lr_eval_string("{sso}"),separators);
while (token != NULL) {
	  lr_output_message("%s", token);
	  strcat(chsso_token,token);
	  token = (char *)strtok(NULL, separators);
	}
lr_save_string(chsso_token,"sso_token");
	
}

The {sso} LoadRunner oparameter above was a result of a web_reg_save_param from a previous http post