Link to home
Start Free TrialLog in
Avatar of henryreynolds
henryreynoldsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Delphi manipulate help

Good Day

I have a string as follows

67           225,231.37DB                                  7,758.41

I want to read each character in the string, if I see that there are more then 15 spaces in the string then I want to fill it with 0.00.

example output should then be

67           225,231.37DB               0.00               7,758.41

Can someone please help me

ASKER CERTIFIED SOLUTION
Avatar of Thommy
Thommy
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of henryreynolds

ASKER

Thanx thommy it work 100%
You can also use POS(..) function...
function CheckStrPos(s:string):string;
var
  p:integer;
begin

  Repeat
    p:=pos(StringOfChar(' ',16),s);
    if p>0 then insert('0.00',s,p+14);
  until p=0;

  result:=s;
end;

Open in new window