home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 20.3 Split()
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- function split(cFullname)
- LOCAL x := at(":", cFullname), y := Rat("\", cFullname)
- LOCAL the_drive:="", the_path:="", the_file:=""
- if x > 0
- the_drive := substr(cFullname,1,x-1)
- endif
- if y > 0
- the_path := substr(cFullname,x+1,y-x)
- the_file := substr(cFullname,y+1)
- endif
- return NIL
-
- // end of file CHP2003.PRG
-