I have a problem with string manipulation in C. I am using Loadrunner, which is based on C
Briefly ...I am trying to
-Capture a URL location and save it into a parameter. (DONE)
- Now use this saved URL location (saved parameter) in a new request to the server.
-I am able to achieve all the above. However, there is one problem.
- the URL location is something like this: http://print/pdflocation/id:MSGH1234&sdID=887778/
-This is causing a problem because of the '&' in the above string. As you know, this is a special character and the new request fails over because of this XML phaser. Because '&' needs to be escaped by '&'
-This means I must manipulate the string captured before using it as input to send the new request.
-- There is no specific function to 'manipulate strings' in loadrunner.
--My problem is because the next call to the WebService uses this string to palce a request.
and as soon as it comes to the '&' it fails over...because it is not escaped.
--The only solution I see to this is:
--- is to capture this string and delete everything after '&' character and then save it in a new parameter before using it to send the next request.
--find the '&' occurance in the string and replace it with '&' and save it in a new parameter.
Could you please give me your guidance on how to acheive this?
I am able to save the parameter and use it in the new request. However, it is the string maipulation I am having trouble with.
Thanks in advance.