Help us shape the future of Go! Take the 2026 Go Developer Survey

strutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package strutil collects small, self-contained string-processing helpers shared across the codebase. The current contents are rune-aware truncation helpers used by display layers (job/session titles, log previews); future generic string utilities (sanitisation, normalisation, masking) belong here too rather than being reinvented in each caller's file. Anything platform- or domain-specific (e.g. messaging filename rules, IM hex/base64 codecs) should live in its own dedicated package instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TruncateRunes

func TruncateRunes(s string, maxRunes int) string

TruncateRunes truncates s to at most maxRunes runes.

func TruncateRunesWithEllipsis

func TruncateRunesWithEllipsis(s string, maxRunes int) string

TruncateRunesWithEllipsis truncates s to at most maxRunes runes, appending "..." if the string was truncated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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