Lua:extractFileNameWithoutExt

From Cheat Engine
Jump to navigation Jump to search

<> Lua API 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

Main Pages

Core Lua documentation entry points

Lua
Script Engine