xstrings

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitParagraph

func SplitParagraph(text string, maxLength int) []string

SplitTextByLength splits text into chunks of specified maxLength, preserving complete words and special characters like newlines. It returns a slice of strings, each with length <= maxLength.

func UniqueSlice

func UniqueSlice[T Comparable](s []T) []T

Types

type Comparable

type Comparable interface{ ~int | ~int64 | ~string }

Jump to

Keyboard shortcuts

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