by Chaitanya Bhatt
LoadRunner: C string function for search and replace
Example of function call:
lr_save_string(“chaitanya m bhatt”, “InputName”);
lr_searchReplace(lr_eval_string(“{InputName}”), “OutputProjName”, ‘ ‘, ‘+’);
Note: Space – ‘ ‘ is the input character or lookup character and ‘+’ is the character which will be replaced in the place of the lookup character.
Note that the input string is = “chaitanya m bhatt” . In this name the lookup character is space – ‘ ‘.
The expected output string is = “chaitanya+m+bhatt” since the variable repChar is set to ‘+’.
void lr_searchReplace(char* inputStr, char* outputStr, char lookupChar, char repChar)
{
char *ptr =inputStr;
char xchar;
int len=0;
int i=0;
lr_output_message("%s",inputStr);
xchar = *ptr;//Copy initial
len=strlen(inputStr);
while (len>0)
{
len--;
xchar = *ptr;
if(xchar==lookupChar)
{
inputStr[i]= repChar;
}
ptr++;
i++;
}
lr_save_string(inputStr,outputStr);
lr_output_message("%s",inputStr);
}
No comments yet.
- air pollen
- Free Tarot Reading
- anabolic steroids
- roofers in wolverhampton
- free nylon movies
- saitek pro flight multi panel
- how to stop biting nails
- echelle telescopique
- dehumidifier
- improving air quality in your home
- reduce yout debt
- How to Write a Profile
- How To Lose Your Stomach
- credit card bad credit
- air purification technology
- เกมส์ต่อสู้ ๒ คน
- Texas Instruments Calculators
- noclegi,hotele,hotel,spa
- tricks
- Lopare
- holiday
- Web Directory
- Hello, I enjoy your weblog. Is there something I can do to get updates like a subscription or something? I’m sorry I am not acquainted with RSS?
- cigar lockers
- HYIP
- Ergometer Test
- Gatsby
- How to keep fit
- outils analyse site
- Helen
- syracuse seo service
- เพลงใหม่ พลพล
- classifieds
- Seattle homes for sale
- hearing impairment
- hearing loss problems
- Feather hair extensions
- Seattle real estate for sale
- Mens leather jackets
- Gifts for grandma
