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