elide

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Overview

Package elide provides basic text eliding functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppName added in v0.3.2

func AppName(s string) string

AppName elides the given app name to be twelve characters or less by removing word(s) from the middle of the string if necessary and possible.

func End

func End(s string, sz int) string

End elides from the end of the string if it is longer than given size parameter. The resulting string will not exceed sz in length, with space reserved for … at the end.

func Middle

func Middle(s string, sz int) string

Middle elides from the middle of the string if it is longer than given size parameter. The resulting string will not exceed sz in length, with space reserved for … in the middle

Types

This section is empty.

Jump to

Keyboard shortcuts

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