package bidirule
Import Path
vendor/golang.org/x/text/secure/bidirule (on go.dev)
Dependency Relation
imports 4 packages, and imported by one package
Involved Source Files
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.
bidirule10.0.0.go
Package-Level Type Names (total 3, in which 1 is exported)
Transformer implements transform.Transform.
hasRTL bool
seen uint16
state ruleState
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.
(*Transformer) advance(s []byte) (n int, ok bool)
(*Transformer) advanceString(s string) (n int, ok bool)
(*Transformer) isFinal() bool
A rule can only be violated for "Bidi Domain names", meaning if one of the
following categories has been observed.
*Transformer : vendor/golang.org/x/text/transform.SpanningTransformer
*Transformer : vendor/golang.org/x/text/transform.Transformer
func New() *Transformer
Package-Level Functions (total 6, in which 5 are exported)
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.
New returns a Transformer that verifies that input adheres to the Bidi Rule.
Valid reports whether b conforms to the BiDi rule.
ValidString reports whether s conforms to the BiDi rule.
Package-Level Variables (total 3, in which 1 is exported)
ErrInvalid indicates a label is invalid according to the Bidi Rule.
Package-Level Constants (total 7, none are exported)
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |