textcut

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package textcut cuts text to a length in characters (runes): a letter is never split, whatever its script.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtWord

func AtWord(s string, n int) string

AtWord - s cut to at most n characters at the last space before them, the punctuation the cut leaves at the end dropped, with "…"; s as it is when it is no longer (or n <= 0).

func Ellipsis

func Ellipsis(s string, n int) string

Ellipsis - s cut to n characters with "…" after them; s as it is when it is no longer (or n <= 0).

func Runes

func Runes(s string, n int) string

Runes - s cut to at most n characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

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