stringsx

package
v1.55.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 9 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confusable added in v1.38.0

func Confusable(x, y string) bool

Implements https://www.unicode.org/reports/tr39/#def-confusable

func GlobMatch added in v1.52.4

func GlobMatch(s, pattern string) bool

GlobMatch does very simple * based glob matching where * can be the entire pattern or start or the end or both.

func GlobSelect added in v1.52.4

func GlobSelect(s string, patterns ...string) string

GlobSelect returns the most specific matching pattern from the given set.

func Skeleton added in v1.38.0

func Skeleton(s string) string

Implements https://www.unicode.org/reports/tr39/#def-skeleton

func Truncate

func Truncate(s string, limit int) string

Truncate truncates the given string to ensure it's less than limit characters

func TruncateEllipsis

func TruncateEllipsis(s string, limit int) string

TruncateEllipsis truncates the given string and adds ellipsis where the input is cut

Types

type Redactor

type Redactor func(s string) string

Redactor is a function which can redact the given string

func NewRedactor

func NewRedactor(mask string, values ...string) Redactor

NewRedactor creates a new redaction function which replaces the given values

Jump to

Keyboard shortcuts

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