stringz

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlignRight

func AlignRight(s string, width int) string

AlignRight aligns the given string to the right, at the given width (minimum = 4), padding with dots.

func EnsurePrefix

func EnsurePrefix(s, prefix string) string

EnsurePrefix ensures that the string has the given (non-repeated) prefix.

func EnsureSuffix

func EnsureSuffix(s, suffix string) string

EnsureSuffix ensures that the string has the given (non-repeated) suffix.

func TruncateLeft

func TruncateLeft(s string, maxWidth int) string

TruncateLeft truncates the given string on the left if longer than maxWidth (minimum = 4).

Types

This section is empty.

Jump to

Keyboard shortcuts

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