Page 1 sur 1

Question sur un String

Publié : sam. 14/janv./2012 1:28
par DarkIchigo
Salut,

j'ai une question a la con, mais j'avoue je trouve plus du tout :
comment je fais pour enregistrer un string avec des "" dedans, sauf erreur j'ai déjà vu qq part qu'il faut l'échapper avant
mais je cherche depuis 1h et je ne trouve plus.

Ex :
ref$ = " a href="blahblahblah" "

Merci :)

Re: Question sur un String

Publié : sam. 14/janv./2012 4:12
par SPH

Code : Tout sélectionner

ref$ = " a href="+Chr(34)+"blahblahblah"+Chr(34)

Debug ref$

Re: Question sur un String

Publié : sam. 14/janv./2012 4:29
par Ar-S
Oui. En gros guillemets = chr(34)

Re: Question sur un String

Publié : sam. 14/janv./2012 11:32
par DarkIchigo
Effectivement c'étais ca en fait.

Merci :)

Re: Question sur un String

Publié : sam. 14/janv./2012 13:41
par dayvid
Oui pas évident la première fois, mais c'est tous bête en faite :)

Re: Question sur un String

Publié : sam. 14/janv./2012 17:21
par Backup
petite variante

Code : Tout sélectionner

ref$ = " a href='blahblahblah'  "
ref$=replacestring(ref$,"'",chr(34),#PB_String_NoCase )

Debug ref$
; 
; EPb 

Re: Question sur un String

Publié : lun. 16/janv./2012 16:11
par dayvid
Mouais pourquoi pas :lol: