Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find a valid Name of Folder
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01288621
Message ID:
01288623
Vues:
21
This message has been marked as the solution to the initial question of the thread.
>Hi all,
>
>I want a function to find a valid name of fich to record on HDD.
>This name of fich is a compagny Name.
>
>
>cCompagnyName = [Résidence "la belle fleur" ( * Sanatorium ) ]
>Must be
>cCompgnyFich = [Résidence la belle fleur ( Sanatorium ) ]
>
>
>
>Thank in advance for help
>
>Bernhart

Write your own where remove all BAD chars:
cCompagnyName = [Résidence "la belle fleur" ( * Sanatorium ) ]
?ValidFolderName(cCompagnyName)

FUNCTION ValidFolderName(lcFolderName)

LOCAL lcBadChars
lcBadChars = ["'*?/\] && Add all chars you want to remove here
lcFolderName = CHRTRAN(lcFolderName,lcBadChars,[])
DO WHILE AT([  ], lcFolderName) # 0 && Remove all double spaces
   lcFolderName = STRTRAN(lcFolderName,[  ],[ ])
ENDDO
RETURN lcFolderName
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform