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

textutil

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package textutil holds the byte-bounded text cut shared by everything that caps text on its way to a model or a user, so no cap can split a UTF-8 character.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CutBytes

func CutBytes(s string, n int) string

CutBytes returns the longest prefix of s that is at most n bytes and does not split a UTF-8 sequence. s comes back unchanged when it fits; n <= 0 gives "".

Types

This section is empty.

Jump to

Keyboard shortcuts

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