|
Loading...
|
LR-LoadRunner@googlegroups.com
[Prev] Thread [Next] | [Prev] Date [Next]
Re: Replace a character with word umamahes wararao Wed Apr 04 08:00:49 2012
Hey instead of writing the below code directly you can use this
function *web_convert_param.
*
*Correct me if i am wrong.*
On Wed, Apr 4, 2012 at 10:00 AM, Kiran <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Kindly help in fixing the below script.
>
> Actually i want to replace "+" character in string to "%2B" in Loadrunner
>
> Example:
> old String: Kiran+Kumar
> Replace: "+" to "%2B"
> New string should be: "Kiran%2BKumar"
>
> My script:
> /*****************************************
>
> char path[] = "cWZmxw0N/eHGagZ+PlAF55J/5J72dy2Y+/mVu9SCJIko";
>
> char separators[] = "+";
>
> char token, temp, *fullstr, str[10], value ;
>
> char *text , *ltemp, *finalstr;
>
> int i = 0, j;
>
>
> token = strtok(path, separators);
>
> /********** this part of script is split the text with delimiter as "+"
> ***********************
> while (token != NULL ) {
>
> i = i +1;
>
> str [i] = token;
>
> lr_output_message ("Str value: %d", str [i] );
>
> token = strtok(NULL, separators);
> }
> /****************************************
>
> /***********************this part to concatenate with
> "%2B"*********************
> for (j=1; j < i+1; j++) {
>
> fullstr = fullstr + str[j];
> lr_output_message ("Str value: %s", fullstr);
> ltemp = (char *)strcat(fullstr, "%2B");
> /*************************************************************
>
> }
>
> Part 2 is not working.
> Welcome for other solution for the case.
>
> Kindly help in fixing this.
>
> Thanks,
> Kiran
>
> --
> You received this message because you are subscribed to the Google
> "LoadRunner" group.
> To post to this group, send email to [EMAIL PROTECTED]
> To unsubscribe from this group, send email to
> [EMAIL PROTECTED]
> For more options, visit this group at
> http://groups.google.com/group/LR-LoadRunner?hl=en
--
With Cheers,
S.V.UmamaheswaraRao
Mobile: +91-9703606358
--
You received this message because you are subscribed to the Google "LoadRunner"
group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/LR-LoadRunner?hl=en
- Replace a character with word Kiran 2012/04/04
- Re: Replace a character with word umamahes wararao 2012/04/04 <=
- Re: Replace a character with word Kiran Kumar 2012/04/04
- Re: Replace a character with word Gaurav Mishra 2012/04/05
- Re: Replace a character with word umamahes wararao 2012/04/05