stringutil

package
v0.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPrefixCI

func HasPrefixCI(s, prefix string) bool

HasPrefixCI checks if string has prefix in case-insensitive mode

func JoinStrings

func JoinStrings[T interface{}](separator string, handler func(item *T) string, items ...T) string

func TrimPrefixCI

func TrimPrefixCI(s string, prefixes ...string) (string, bool)

TrimPrefixCI trims first found prefix in case-insensitive mode

func TruncateUTF8

func TruncateUTF8[T UTF8String](s T, limit int) T

TruncateUTF8 truncates utf-8 string

Types

type UTF8String

type UTF8String interface {
	string | []byte
}

Jump to

Keyboard shortcuts

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