strslice

package
Version: v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 6 Imported by: 5

Documentation

Overview

Package strslice provides a few helper functions for dealing with []string.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Common

func Common(a, b []string) []string

func Contains

func Contains(list []string, a string) bool

Contains checks if a string is in a []string, returns bool.

func ContainsCaseDiacriticsInsensitive added in v0.37.0

func ContainsCaseDiacriticsInsensitive(list []string, a string) bool

ContainsCaseDiacriticsInsensitive checks if a string is in a []string, regardless of case or diacritics.

func ContainsCaseInsensitive

func ContainsCaseInsensitive(list []string, a string) bool

ContainsCaseInsensitive checks if a string is in a []string, regardless of case.

func Equal added in v0.26.0

func Equal(a, b []string) bool

Equal tells whether a and b contain the same elements.

func EqualCaseInsensitive added in v0.26.0

func EqualCaseInsensitive(a, b []string) bool

Equal tells whether a and b contain the same elements, regardless of case.

func HasDuplicates added in v0.26.0

func HasDuplicates(options []string) bool

HasDuplicates in []string.

func Remove

func Remove(s []string, r string) []string

Remove a particular string.

func RemoveCaseDiacriticsInsensitive added in v0.37.0

func RemoveCaseDiacriticsInsensitive(s []string, r string) []string

RemoveCaseDiacriticsInsensitive a particular string.

func RemoveCaseInsensitive added in v0.22.0

func RemoveCaseInsensitive(s []string, r string) []string

RemoveCaseInsensitive a particular string.

func RemoveDuplicates

func RemoveDuplicates(options *[]string, otherStringsToClean ...string)

RemoveDuplicates in []string.

func RemoveDuplicatesCaseDiacriticsInsensitive added in v0.35.0

func RemoveDuplicatesCaseDiacriticsInsensitive(options *[]string, otherStringsToClean ...string)

RemoveDuplicatesCaseDiacriticsInsensitive in []string.

func RemoveDuplicatesCaseInsensitive added in v0.29.0

func RemoveDuplicatesCaseInsensitive(options *[]string, otherStringsToClean ...string)

RemoveDuplicatesCaseInsensitive in []string.

func ToIntSlice

func ToIntSlice(in []string) ([]int, error)

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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