stringslice

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 2 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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