Lua:extractFileExt
Jump to navigation
Jump to search
<> Reference
function extractFileExt(filepath) : string
Returns the file extension of the given path.
Function Parameters
| Parameter | Type | Description |
|---|---|---|
| filepath | String | The path to extract the file extension from. |
Returns
string — The file extension of the given path.
Examples
local extension = extractFileExt("C:\\\\Temp\\\\example.txt")
print(extension)
-- .txt
See Also
Main Pages