18 lines
293 B
Plaintext
18 lines
293 B
Plaintext
:sig
|
|
String basename(String fn)
|
|
|
|
:params
|
|
fn : a path
|
|
return value : the final path component
|
|
|
|
:content
|
|
Returns the last component of a path — the file or directory name without its leading directories.
|
|
|
|
:example
|
|
print(basename("/var/www/site/index.uce"), "\n");
|
|
|
|
:see
|
|
>sys
|
|
dirname
|
|
path_join
|