Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a valid Name of Folder
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01288621
Message ID:
01288739
Views:
12
>
>*---------------------------------------------------------------------------------
>* ut 02/2008 TRouver un nom valide pour enregister le compagnyName
>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
>
>lcFolderName = CHRTRAN(lcFolderName,[ ],[_])
>lcFolderName = CHRTRAN(lcFolderName,[é],[e])
>lcFolderName = CHRTRAN(lcFolderName,[è],[e])
>lcFolderName = CHRTRAN(lcFolderName,[ê],[e])
>lcFolderName = CHRTRAN(lcFolderName,[à],[a])
>lcFolderName = CHRTRAN(lcFolderName,[â],[a])
>RETURN lcFolderName
>
>
>This code seems to work ...

:-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform