FoxPro JustExt() function

The VFP JustExt() function returns the extension from a string containing a file name. For example:

JustExt ("vfp9.exe")

would return:

"exe"

If the file has no extension, or if the file name just ends in a period, then an empty string will be returned.

As with JustDrive(), JustExt() does not look at the file system or check that the parameter is a properly formed name or path. All that it does is look for the final period in a string and return the characters that follow it.

Note that this implies that the function will return the final extension from a file name that includes two periods and two extensions.

VBA equivalent

Microsoft Access does not have equivalents to these FoxPro file name commands so I wrote this library Visual Basic functions to do give me the same facilities in VBA.