RE: Removing spaces from a string
Hi, I'm working with Winrunner 8.2 and am using the obj_get_text from a Delphi application, I get the string as follows:
"Person Client Client Details Valuation"
What I'm trying to do is remove all the spaces and hopefully populate the string with commas.
I've tried using the split facility but keep getting the last string Valuation returned, also if i use the following I get the number of text fields:
obj_get_text(PageName, header, 0, 0, 1024, 20);
header1 = split(header, array, " "); *Using this to look for where there are two spaces *
When i look at the results for header1 I get "60" returned.
Anyone help on this, sorry to be so stupid and i bet there is an easy way to do this.
Re: RE: Removing spaces from a string
Maybe Tony's function replace_string might help you:
And here are also some pieces of code concerning string operations: