basename

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2021 License: MIT-0 Imports: 2 Imported by: 0

Documentation

Overview

return non-directory portion of a pathname.

SYNOPSIS

basename STRING [suffix]

DESCRIPTION

basename deletes any prefix ending with the last slash ("/") character present in STRING, and a suffix, if given. The resulting filename is written to the standard output. A non-existent suffix is ignored.

SEE ALSO

https://golang.org/pkg/path/filepath/#Base

REFERENCES

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/basename.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Basename

func Basename(operand string, suffix string) (string, error)

Basename returns the non-directory portion of a pathname by deleting any prefix ending with the last forward slash (‘/’), and a suffix if given which may be an empty string if not required.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL