utf8

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package utf8 provides a mockable wrapper for unicode/utf8.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) AppendRune

func (*Impl) AppendRune(p []byte, r rune) []byte

func (*Impl) DecodeLastRune

func (*Impl) DecodeLastRune(p []byte) (r rune, size int)

func (*Impl) DecodeLastRuneInString

func (*Impl) DecodeLastRuneInString(s string) (r rune, size int)

func (*Impl) DecodeRune

func (*Impl) DecodeRune(p []byte) (r rune, size int)

func (*Impl) DecodeRuneInString

func (*Impl) DecodeRuneInString(s string) (r rune, size int)

func (*Impl) EncodeRune

func (*Impl) EncodeRune(p []byte, r rune) int

func (*Impl) FullRune

func (*Impl) FullRune(p []byte) bool

func (*Impl) FullRuneInString

func (*Impl) FullRuneInString(s string) bool

func (*Impl) RuneCount

func (*Impl) RuneCount(p []byte) int

func (*Impl) RuneCountInString

func (*Impl) RuneCountInString(s string) (n int)

func (*Impl) RuneLen

func (*Impl) RuneLen(r rune) int

func (*Impl) RuneStart

func (*Impl) RuneStart(b byte) bool

func (*Impl) Valid

func (*Impl) Valid(p []byte) bool

func (*Impl) ValidRune

func (*Impl) ValidRune(r rune) bool

func (*Impl) ValidString

func (*Impl) ValidString(s string) bool

type Interface

type Interface interface {
	AppendRune(p []byte, r rune) []byte
	DecodeLastRune(p []byte) (r rune, size int)
	DecodeLastRuneInString(s string) (r rune, size int)
	DecodeRune(p []byte) (r rune, size int)
	DecodeRuneInString(s string) (r rune, size int)
	EncodeRune(p []byte, r rune) int
	FullRune(p []byte) bool
	FullRuneInString(s string) bool
	RuneCount(p []byte) int
	RuneCountInString(s string) (n int)
	RuneLen(r rune) int
	RuneStart(b byte) bool
	Valid(p []byte) bool
	ValidRune(r rune) bool
	ValidString(s string) bool
}

Jump to

Keyboard shortcuts

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