strings

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromPointer

func FromPointer(s *string) string

FromPointer returns the string value of a pointer to a string. If the pointer is nil, it returns an empty string.

func Pluralize added in v0.1.2

func Pluralize(count int, singular, plural string) string

Pluralize returns the singular form if count is 1, otherwise the plural form.

func TruncateString added in v0.1.2

func TruncateString(s string, maxLen int) string

TruncateString truncates a string to a maximum length.

func WrapText added in v0.1.2

func WrapText(text string, width int) string

WrapText wraps text to the specified width, breaking at word boundaries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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