by Chaitanya Bhatt
LoadRunner: A C function to find substring using left and right boundaries
This kind of works like the popular LoadRunenr web_reg_save_param function, hence I named it as web_reg_param_custom()
void web_reg_save_param_custom(char *sourceStr, char* outpuStr, char *leftBdry, char *rightBdry)
{
char *st1, *st2;
int result, i = 0;
i=strlen(leftBdry);
st1 = (char*) strstr(sourceStr, leftBdry);
if (st1 != NULL){
st1 += i;
st2 = (char*) strstr(st1, rightBdry);
if (st2 != NULL){
result = st2 - st1;
*(st1 + result) = '\0';
}
}
if ((st1 == NULL) || (st2 == NULL))
lr_error_message("Error: No substring found for the specified boundary");
else
lr_save_string(lr_eval_string(st1), outpuStr);
}
Usage example:
web_reg_save_param_custom(lr_eval_string("{originalString}"),"outputString","token", "endKey" );
The function call shown above fetches a substring from the “originalString” parameter and saves it in “outputString” paramater based on the Left and Right boundary values – “Token” and “endKey”. So if “originalString” param had the value “xyzToken3234344endKey,” the outputString parameter will contain the value “3234344″
No comments yet.
- consolidation credit
- Boston estate planning attorney
- Massachusetts probate attorney
- Boston elder law
- san diego painter
- revimax creme
- elder law attorney in Boston
- Massachusetts probate attorney
- call tracking
- tips tricks scripts
- lotus tarot
- booster seat
- เกมส์ต่อสู้ 2 คน
- Lopare
- Mercy Johnson
- Remodeling Contractors The Woodlands
- Web Directory
- good Kharma keeps the wheel turning…
- ktm dirt bike forum
- hier gehts direkt zur seite
- dental implant
- Used Cars
- HYIP
- free kindle
- Ergometer Test
- How to keep fit
- GAME
- achat fans
- Moroccan Oil Review
- trampoline avec filet
- wholesale lingerie
- counter strike global offensive beta
- syracuse seo service
- Inexpensive Link Building
- franchises for sale nz
- เพลงใหม่ หวาย
- classifieds
- Hair Extensions
- Kindle South Africa
- cheap hearing aids
- hearing aids
- Seattle homes for sale
- optimizacija za pretrazivace
- Mens leather jackets
- Gifts for grandma
