utf8

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Invalid = 0
	UTF8    = 0b01
	ASCII   = 0b10 | UTF8
)

Variables

This section is empty.

Functions

func Valid

func Valid(p []byte) bool

Valid reports whether p consists entirely of valid UTF-8-encoded runes.

Types

type Validation

type Validation byte

func Validate

func Validate(p []byte) Validation

Validate is a more precise version of Valid that also indicates whether the input was valid ASCII.

func (Validation) IsASCII

func (v Validation) IsASCII() bool

func (Validation) IsInvalid

func (v Validation) IsInvalid() bool

func (Validation) IsUTF8

func (v Validation) IsUTF8() bool

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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