vainpath

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Simplify added in v0.5.0

func Simplify(path string) (ret string)

Simplify formats inputs in a way similar to the fish shell's method of shortening paths in 'fish/functions/prompt_pwd.fish' and is properly Windows-sensitive; it will almost certainly not return valid paths and should be used for vanity purposes only. Inputs are assumed to be valid UTF-8-encoded strings.

func Trim added in v0.5.0

func Trim(str, tail string, n int) (ret string)

Trim inputs to no more than n runes; the output will end in the tail specified if the input is longer than n runes. Inputs are assumed to be valid UTF-8-encoded strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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