filename_ext

This function returns the extension part of the indicated file name, including the leading dot.

 

Syntax:

filename_ext(fname);

ArgumentTypeDescription
fnameStringThe file to use.

 

Returns:

String

 

Example:

ext = filename_ext(file_find_first("*.*", 0));

The above code gets the extension (as a string) of the specified file.