textutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package textutil provides shared text accumulation and truncation helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendRuneTail

func AppendRuneTail(current, chunk string, limit int) string

AppendRuneTail appends chunk and keeps the last limit runes.

Types

type StringAccumulator

type StringAccumulator struct {
	// contains filtered or unexported fields
}

StringAccumulator appends to a seeded string without repeatedly copying the full previously-built value on every delta.

func (*StringAccumulator) Append

func (a *StringAccumulator) Append(current, chunk string) string

func (*StringAccumulator) Reset

func (a *StringAccumulator) Reset()

Jump to

Keyboard shortcuts

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