elide

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package elide provides basic text eliding functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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