Skip to content

mah0x211/lua-basename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lua-basename

test Coverage Status

extract the base portion of a pathname.

Installation

luarocks install basename

name = basename( pathname )

extract the base portion of a pathname.

Parameters

  • pathname:string: pathname string.

Returns

  • name:string: the base portion of a pathname.

Example

local basename = require('basename')
print(basename('/foo/bar/baz.qux')) -- 'baz.qux'
-- the trailing-slashes will be deleted.
print(basename('///usr///bin///')) -- 'bin'

About

extract the base portion of a pathname.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages