Fun with LoadRunner and String

I had a parameter pEnv which is a capital letter and I need to convert this to a lower case string. Simple I think why not just do this:

lr_save_string(strlwr(lr_eval_string(“{pEnv}”)),”pLowEnv”);

But I get an error

: type error in argument 1 to `lr_save_string’; found `int’ expected `pointer to const char’

So I needed to do this to make it work.

lr_save_string((char *)strlwr(lr_eval_string(“{pEnv}”)),”pLowEnv”);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s