kubernetes/vendor/golang.org/x/text/secure/bidirule/bidirule.go

var ErrInvalid

type ruleState

const ruleInitial

const ruleLTR

const ruleLTRFinal

const ruleRTL

const ruleRTLFinal

const ruleInvalid

type ruleTransition

var transitions

const exclusiveRTL

// Direction reports the direction of the given label as defined by RFC 5893.
// The Bidi Rule does not have to be applied to labels of the category
// LeftToRight.
func Direction(b []byte) bidi.Direction {}

// DirectionString reports the direction of the given label as defined by RFC
// 5893. The Bidi Rule does not have to be applied to labels of the category
// LeftToRight.
func DirectionString(s string) bidi.Direction {}

// Valid reports whether b conforms to the BiDi rule.
func Valid(b []byte) bool {}

// ValidString reports whether s conforms to the BiDi rule.
func ValidString(s string) bool {}

// New returns a Transformer that verifies that input adheres to the Bidi Rule.
func New() *Transformer {}

type Transformer

// A rule can only be violated for "Bidi Domain names", meaning if one of the
// following categories has been observed.
func (t *Transformer) isRTL() bool {}

// Reset implements transform.Transformer.
func (t *Transformer) Reset() {}

// Transform implements transform.Transformer. This Transformer has state and
// needs to be reset between uses.
func (t *Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {}

// Span returns the first n bytes of src that conform to the Bidi rule.
func (t *Transformer) Span(src []byte, atEOF bool) (n int, err error) {}

var asciiTable

func init() {}

func (t *Transformer) advance(s []byte) (n int, ok bool) {}

func (t *Transformer) advanceString(s string) (n int, ok bool) {}