package internal

import "github.com/rs/cors/internal"

adapted from github.com/jub0bs/cors

Index

Types

type SortedSet

type SortedSet struct {
	// contains filtered or unexported fields
}

A SortedSet represents a mathematical set of strings sorted in lexicographical order. Each element has a unique position ranging from 0 (inclusive) to the set's cardinality (exclusive). The zero value represents an empty set.

func NewSortedSet

func NewSortedSet(elems ...string) SortedSet

NewSortedSet returns a SortedSet that contains all of elems, but no other elements.

func (SortedSet) Accepts

func (set SortedSet) Accepts(values []string) bool

Accepts reports whether values is a sequence of list-based field values whose elements are

func (SortedSet) Size

func (set SortedSet) Size() int

Size returns the cardinality of set.

func (SortedSet) String

func (set SortedSet) String() string

String sorts joins the elements of set (in lexicographical order) with a comma and returns the resulting string.

Source Files

sortedset.go

Version
v1.11.1 (latest)
Published
Aug 29, 2024
Platform
js/wasm
Imports
2 packages
Last checked
2 hours ago

Tools for package owners.