Auto Replace Text

Auto Replace Text

Postby Jeff Barnes » Tue Aug 17, 2010 11:30 pm

Hi,

I would like to be able to locate a word in a text variable and replace it with something else.

Ex:
cText := "I would like to replace #THIS# word with something else"

The text "#THIS#" is what I would like to replace with other text.

All the words that will need to be replaced will start and end with the # symbol.


Is there any function that will let me do something like this?
Maybe in the format: ReplaceText( cTextString, cOriginalText, cNewText)
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Auto Replace Text

Postby Daniel Garcia-Gil » Tue Aug 17, 2010 11:39 pm

User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Auto Replace Text

Postby Jeff Barnes » Tue Aug 17, 2010 11:50 pm

Thanks Daniel. Exactly what I needed :D
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 101 guests