Help us shape the future of Go! Take the 2026 Go Developer Survey

stringslice

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromString added in v0.19.0

func FromString(s string, sep string) []string

FromString converts a string to a slice of strings, splitting on the sep character. Unlike strings.Split, this function will also trim whitespace from the resulting strings.

func StringSliceToIntSlice

func StringSliceToIntSlice(ss []string) ([]int, error)

StringSliceToIntSlice converts a slice of strings to a slice of ints. Returns an error if any values cannot be parsed.

func UniqueFold added in v0.26.0

func UniqueFold(s []string) []string

Unique returns a slice containing only unique values from the provided slice. The comparison is case-insensitive.

Types

This section is empty.

Jump to

Keyboard shortcuts

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