stringslice

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(a []string) []string

Capitalize capitalizes the first letter of each string in the slice.

func Repeat

func Repeat(a []string, count int) []string

Repeat repeats each string in the slice count times.

func Replace

func Replace(a []string, old, new string, n int) []string

Replace replaces all occurrences of old in each string in the slice with new.

func ReplaceAll

func ReplaceAll(a []string, old, new string) []string

ReplaceAll replaces all occurrences of old in each string in the slice with new.

func ToLower

func ToLower(a []string) []string

ToLower lower-cases all strings in the slice.

func ToTitle

func ToTitle(a []string) []string

ToTitle title-cases all strings in the slice.

func ToUpper

func ToUpper(a []string) []string

ToUpper upper-cases all strings in the slice.

func Trim

func Trim(a []string, cutset string) []string

Trim removes leading and trailing white space from each string in the slice.

func TrimLeft

func TrimLeft(a []string, cutset string) []string

TrimLeft removes leading white space from each string in the slice.

func TrimPrefix

func TrimPrefix(a []string, prefix string) []string

TrimPrefix removes leading prefix from each string in the slice.

func TrimRight

func TrimRight(a []string, cutset string) []string

TrimRight removes trailing white space from each string in the slice.

func TrimSpace

func TrimSpace(a []string) []string

TrimSpace removes leading and trailing white space from each string in the slice.

func TrimSuffix

func TrimSuffix(a []string, suffix string) []string

TrimSuffix removes trailing suffix from each string in the slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳