charset

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package charset provides various charset filters to be used in combination with charset validator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASCII

type ASCII struct{}

ASCII accepts ASCII runes.

func (ASCII) Filter

func (ASCII) Filter(r rune) error

type ASCIILetter

type ASCIILetter = And[ASCII, Letter]

ASCIILetter intersects ASCII and Letter.

type ASCIINumber

type ASCIINumber = And[ASCII, Number]

ASCIINumber intersects ASCII and Number.

type ASCIIPrint

type ASCIIPrint = And[ASCII, Print]

ASCIIPrint intersects ASCII and Print.

type ASCIIPunct

type ASCIIPunct = And[ASCII, Punct]

ASCIIPunct intersects ASCII and Punct.

type And

type And[A, B Filter] struct{}

And is a meta filter that combines multiple filters using AND operator.

func (And[A, B]) Filter

func (And[A, B]) Filter(r rune) error

type Any

type Any struct{}

Any accepts any rune.

func (Any) Filter

func (Any) Filter(rune) error

type Control

type Control struct{}

Control wraps unicode.IsControl.

func (Control) Filter

func (Control) Filter(r rune) error

type Filter

type Filter interface {
	Filter(r rune) error
}

Filter represents charset filter.

type Graphic

type Graphic struct{}

Graphic wraps unicode.IsGraphic.

func (Graphic) Filter

func (Graphic) Filter(r rune) error

type Letter

type Letter struct{}

Letter wraps unicode.IsLetter.

func (Letter) Filter

func (Letter) Filter(r rune) error

type Mark

type Mark struct{}

Mark wraps unicode.IsMark.

func (Mark) Filter

func (Mark) Filter(r rune) error

type Not

type Not[F Filter] struct{}

Not is a meta filter that inverts given filter.

func (Not[F]) Filter

func (Not[F]) Filter(r rune) error

type Number

type Number struct{}

Number wraps unicode.IsNumber.

func (Number) Filter

func (Number) Filter(r rune) error

type Or

type Or[A, B Filter] struct{}

Or is a meta filter that combines multiple filters using OR operator.

func (Or[A, B]) Filter

func (Or[A, B]) Filter(r rune) error

type Print

type Print struct{}

Print wraps unicode.IsPrint.

func (Print) Filter

func (Print) Filter(r rune) error

type Punct

type Punct struct{}

Punct wraps unicode.IsPunct.

func (Punct) Filter

func (Punct) Filter(
	r rune,
) error

type Space

type Space struct{}

Space wraps unicode.IsSpace.

func (Space) Filter

func (Space) Filter(r rune) error

type Symbol

type Symbol struct{}

Symbol wraps unicode.IsSymbol.

func (Symbol) Filter

func (Symbol) Filter(r rune) error

Jump to

Keyboard shortcuts

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