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[edit]
| Parameter | Type | Description |
|---|---|---|
| filepath | String | The path to extract the filename from. |
Returns[edit]
string — The filename part of the given path without the file extension.
Examples[edit]
local filename = extractFileName("C:\\\\Temp\\\\example.txt")
local filenameNoExt = extractFileNameWithoutExt(filename)
print(filenameNoExt)
-- example
See Also[edit]
Main Pages