filename_ext(fname)

From ENIGMA
Jump to navigation Jump to search

Description

Gets the extension of the given file name including the leading dot and returns it.

Parameters

Parameter Data Type Description
fname string file name and path

Return Values

string: Returns the extension including the leading dot of the file name.

Example Call

// demonstrates obtaining the extension of a file name
var ext;
ext = filename_ext("mygamefile.txt"); // will return ".txt"