Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
STRTRANS and Slashes
Message
De
11/12/2007 03:53:08
 
 
À
10/12/2007 17:08:10
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01274617
Message ID:
01274711
Vues:
9
This message has been marked as the solution to the initial question of the thread.
>I need to make sure that there are two slashes only in a textbox value. It usually would start with only 1 slash, so it would be increased to two, but over time it was replacing the doubles with 4, etc. This code in the LostFocus seems to work, but I know it's not the best way. Any ideas? Thanks!
>
>
>THISFORM.DataDir = STRTRAN(THIS.Value,'\','\\')
>THISFORM.DataDir = STRTRAN(THIS.Value,'\\\','\\')
>
Why not just:
lcString= THIS.Value
DO WHILE ("\\"$lcString)
  lcString = STRTRAN(lcString,"\\","\")
ENDDO
THISFORM.DataDir = STRTRAN(lcString,"\","\\")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform