strutil

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package strutil provides common string utility functions shared across engram packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsAny

func ContainsAny(s string, substrs []string) bool

ContainsAny reports whether s contains any of the given substrings.

func Truncate

func Truncate(s string, maxLen int) string

Truncate truncates s to maxLen characters, appending "..." if truncated. The returned string may be up to maxLen+3 characters long.

func TruncateTrimmed

func TruncateTrimmed(s string, maxLen int) string

TruncateTrimmed trims whitespace from s before truncating.

Types

This section is empty.

Jump to

Keyboard shortcuts

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