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) 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.

func (SortedSet) Subsumes

func (set SortedSet) Subsumes(csv string) bool

Subsumes reports whether csv is a sequence of comma-separated names that are

Source Files

sortedset.go

Version
v1.11.0
Published
Apr 24, 2024
Platform
js/wasm
Imports
2 packages
Last checked
12 hours ago

Tools for package owners.