package strutils

import "github.com/hashicorp/cap/oidc/internal/strutils"

Index

Functions

func RemoveDuplicatesStable

func RemoveDuplicatesStable(items []string, caseInsensitive bool) []string

RemoveDuplicatesStable removes duplicate and empty elements from a slice of strings, preserving order (and case) of the original slice. In all cases, strings are compared after trimming whitespace If caseInsensitive, strings will be compared after ToLower()

func StrListContains

func StrListContains(haystack []string, needle string) bool

StrListContains looks for a string in a list of strings.

Source Files

strutils.go

Version
v0.9.0 (latest)
Published
Feb 28, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
2 months ago

Tools for package owners.