util

package
v1.1.58 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TruncateString

func TruncateString(s string, maxBytes int) string

TruncateString returns a valid UTF-8 prefix of s whose byte length is at most maxBytes.

func TruncateWithSuffix

func TruncateWithSuffix(s string, maxBytes int, suffix string) string

TruncateWithSuffix truncates s with TruncateString and appends suffix when truncation occurs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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