Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to tell if file string is and .dbf?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00398179
Message ID:
00398212
Views:
26
>I find string handling routines one of the most difficult things about the foxpro language syntax. I always go to the "ST" in the reference and find very little on functions/routines on strings. Does someone have a cheatsheat?
>
>Anyway, I have a filename with a path and want to know if the file is an *.dbf. should not be difficult, but i have not been able to do it.
>
>c:\something\somethingelse\data.dbf
>
>thanks
>
>brenda

Brenda, in addition to what George says you can use
IF ".DBF" $ UPPER(mystring)
***
ENDIF

In fact there are too many string functions in VFP :)
They just do not all start with ST. :)
Just to name some:

AT()
ATC()
ATCC()
AT_C()
ATCLINE()
ATLINE()
LEFT()
LEFTC()
RIGHT()
RIGHTC()
SUBSTR()
SUBSTRC()
RAT()
RATC()
TRIM()
LTRIM()
RTRIM()
ALLTRIM()
STRTOFILE()
OCCURS()
FILETOSTR()
STRTRAN()
STUFF()
PADC()
PADL()
PADR()
TRANSFORM()
RATLINE()
UPPER()
LOWER()
...
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform