home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 20.6 Occurs()
- 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 occurs(cChar,cString)
- LOCAL x := len(cString), y := len(strtran(cString,cChar,""))
- return (x-y) / len(cChar)
-
- // end of file CHP2006.PRG
-