ST3VO
asked on
Remove last characters of a string
hi all,
I have a URL that I need to change.
It looks like this:
http://www.somewebsite/com/35445485448154_2b.jpg
I need to remove the "2b.jpg" at the end and replace it with "1b.jpg"
It's urgent...could you please help?
Thanks
ST3VO
I have a URL that I need to change.
It looks like this:
http://www.somewebsite/com/35445485448154_2b.jpg
I need to remove the "2b.jpg" at the end and replace it with "1b.jpg"
It's urgent...could you please help?
Thanks
ST3VO
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
update_url is a funciton not a procedure. which means it returns the modified string as a result. basically this allows you to use it nicely in one line like below ;)
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text:=update_url(edit2.text,'1b.jpg');
end;
ASKER
Perfect!!! Thanks! :o)
ASKER
Open in new window