mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03:46 +01:00
Rename file.get_extension to file.split_extension
This commit is contained in:
parent
dc80e8b45c
commit
277c076651
6
file.lua
6
file.lua
@ -9,9 +9,11 @@ function get_name(filepath)
|
||||
assert(#modlib.dir_delim == 1)
|
||||
return filepath:match(modlib.dir_delim .. "?(.-)$")
|
||||
end
|
||||
function get_extension(filename)
|
||||
return filename:match"(.*)%.(.*)$"
|
||||
function split_extension(filename)
|
||||
return filename:match"^(.*)%.(.*)$"
|
||||
end
|
||||
--! deprecated
|
||||
get_extension = split_extension
|
||||
|
||||
function read(filename)
|
||||
local file = io.open(filename, "r")
|
||||
|
Loading…
Reference in New Issue
Block a user