* * STRIPEXT - Strip the extension from a file name. * * Description: * Use the algorithm employed by FoxPRO itself to strip a * file of an extension (if any): Find the rightmost dot in * the filename. If this dot occurs to the right of a "\" * or ":", then treat everything from the dot rightward * as an extension. Of course, if we found no dot, * we just hand back the filename unchanged. * * Parameters: * filename - character string representing a file name * * Return value: * The string "filename" with any extension removed * * This procedure courtesy of Fox Software * Modified to use naming conventions FUNCTION stripext PARAMETER m.lcFileName PRIVATE m.lndotpos, m.lnTermintr m.lndotpos = RAT(".", m.lcFileName) m.lnTermintr = MAX(RAT("\", m.lcFileName), RAT(":", m.lcFileName)) IF m.lndotpos > m.lnTermintr m.lcFileName = LEFT(m.lcFileName, m.lndotpos-1) ENDIF RETURN m.lcFileName