PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 2024 → Replace " character
Replace " character
Débuté par Ruan, 30 mai 2016 13:33 - 4 réponses
Membre enregistré
209 messages
Popularité : +1 (1 vote)
Posté le 30 mai 2016 - 13:33
Good Day

I am trying to replace the " in a string and it sees it as an error...What should I add for the system to see the " as a character.

InitialString is string = EDT_Text1
sReplacedString is string = Replace(InitialString, " " ", "")


Thanks

Ruan
Membre enregistré
34 messages
Popularité : +3 (3 votes)
Posté le 09 août 2016 - 15:42
Hello Ruan,

I just ran into this problem a couple of days ago

Use this:

InitialString is string = EDT_Text1
sStringToErase is string = [
"
]
sReplacedString is string = Replace(InitialString, sStringToErase, "")



Kind regards,

Tim
Membre enregistré
209 messages
Popularité : +1 (1 vote)
Posté le 10 août 2016 - 07:58
Tim wrote:
Hello Ruan,

I just ran into this problem a couple of days ago

Use this:

InitialString is string = EDT_Text1
sStringToErase is string = [
"
]
sReplacedString is string = Replace(InitialString, sStringToErase, "")



Kind regards,

Tim


Thanks so much Tim!!!
Message modifié, 10 août 2016 - 07:59
Membre enregistré
3 messages
Posté le 10 août 2016 - 10:03
There no need to define de double quotes with 3 code lines, simply create a string with two double quotes inside.

DoubleQuote = """"
Posté le 10 août 2016 - 16:44
Or simply use charact(34)

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)

More information on http://www.fabriceharari.com


Le 8/10/2016 à 2:03 AM, Rafaelo a écrit :
There no need to define de double quotes with 3 code lines, simply
create a string with two double quotes inside.

DoubleQuote = """"