import "golang.org/x/text/secure/bidirule"
Package bidirule implements the Bidi Rule defined by RFC 5893.
This package is under development. The API may change without notice and without preserving backward compatibility.
ErrInvalid indicates a label is invalid according to the Bidi Rule.
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.
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.
Valid reports whether b conforms to the BiDi rule.
ValidString reports whether s conforms to the BiDi rule.
type Transformer struct {
// contains filtered or unexported fields
}
Transformer implements transform.Transform.
func New() *Transformer
New returns a Transformer that verifies that input adheres to the Bidi Rule.
func (t *Transformer) Reset()
Reset implements transform.Transformer.
Span returns the first n bytes of src that conform to the Bidi rule.
Transform implements transform.Transformer. This Transformer has state and needs to be reset between uses.
Package bidirule imports 4 packages (graph) and is imported by 6 packages. Updated 2020-12-09. Refresh now. Tools for package owners.