package bidi

Import Path
	vendor/golang.org/x/text/unicode/bidi (on golang.org and go.dev)

Dependency Relation
	imports 5 packages, and imported by 2 packages

Involved Source Files
	d-> bidi.go
	    bracket.go
	    core.go
	    prop.go
	    tables12.0.0.go
	    trieval.go

Exported Type Names

type Class uint Class is the Unicode BiDi class. Each rune has a single class. func Properties.Class() Class const AL const AN const B const BN const Control const CS const EN const ES const ET const FSI const L const LRE const LRI const LRO const NSM const ON const PDF const PDI const R const RLE const RLI const RLO const S const WS
type Direction int A Direction indicates the overall flow of text. func (*Ordering).Direction() Direction func (*Paragraph).Direction() Direction func (*Run).Direction() Direction func vendor/golang.org/x/text/secure/bidirule.Direction(b []byte) Direction func vendor/golang.org/x/text/secure/bidirule.DirectionString(s string) Direction func DefaultDirection(d Direction) Option const LeftToRight const Mixed const Neutral const RightToLeft
type Option (func) An Option is an option for Bidi processing. func DefaultDirection(d Direction) Option func (*Paragraph).SetBytes(b []byte, opts ...Option) (n int, err error) func (*Paragraph).SetString(s string, opts ...Option) (n int, err error)
type Ordering (struct) An Ordering holds the computed visual order of runs of a Paragraph. Calling SetBytes or SetString on the originating Paragraph invalidates an Ordering. The methods of an Ordering should only be called by one goroutine at a time. (*T) Direction() Direction (*T) NumRuns() int (*T) Run(i int) Run func (*Paragraph).Line(start, end int) (Ordering, error) func (*Paragraph).Order() (Ordering, error)
type Paragraph (struct) A Paragraph holds a single Paragraph for Bidi processing. (*T) Direction() Direction (*T) IsLeftToRight() bool (*T) Line(start, end int) (Ordering, error) (*T) Order() (Ordering, error) (*T) RunAt(pos int) Run (*T) SetBytes(b []byte, opts ...Option) (n int, err error) (*T) SetString(s string, opts ...Option) (n int, err error)
type Properties (struct) Properties provides access to BiDi properties of runes. (T) Class() Class (T) IsBracket() bool (T) IsOpeningBracket() bool func Lookup(s []byte) (p Properties, sz int) func LookupRune(r rune) (p Properties, size int) func LookupString(s string) (p Properties, sz int)
type Run (struct) A Run is a continuous sequence of characters of a single direction. (*T) Bytes() []byte (*T) Direction() Direction (*T) Pos() (start, end int) (*T) String() string *T : expvar.Var *T : fmt.Stringer func (*Ordering).Run(i int) Run func (*Paragraph).RunAt(pos int) Run
Exported Values
const AL Class = 13 // ArabicLetter
const AN Class = 5 // ArabicNumber
func AppendReverse(out, in []byte) []byte AppendReverse reverses the order of characters of in, appends them to out, and returns the result. Modifiers will still follow the runes they modify. Brackets are replaced with their counterparts.
const B Class = 7 // ParagraphSeparator
const BN Class = 11 // BoundaryNeutral
const Control Class = 14 // Control LRO - PDI
const CS Class = 6 // CommonSeparator
func DefaultDirection(d Direction) Option DefaultDirection sets the default direction for a Paragraph. The direction is overridden if the text contains directional characters.
const EN Class = 2 // EuropeanNumber
const ES Class = 3 // EuropeanSeparator
const ET Class = 4 // EuropeanTerminator
const FSI Class = 23 // FirstStrongIsolate
const L Class = 0 // LeftToRight
const LeftToRight Direction = 0 LeftToRight indicates the text contains no right-to-left characters and that either there are some left-to-right characters or the option DefaultDirection(LeftToRight) was passed.
func Lookup(s []byte) (p Properties, sz int) Lookup returns properties for the first rune in s and the width in bytes of its encoding. The size will be 0 if s does not hold enough bytes to complete the encoding.
func LookupRune(r rune) (p Properties, size int) LookupRune returns properties for r.
func LookupString(s string) (p Properties, sz int) LookupString returns properties for the first rune in s and the width in bytes of its encoding. The size will be 0 if s does not hold enough bytes to complete the encoding.
const LRE Class = 18 // LeftToRightEmbedding
const LRI Class = 21 // LeftToRightIsolate
const LRO Class = 16 // LeftToRightOverride
const Mixed Direction = 2 Mixed indicates text contains both left-to-right and right-to-left characters.
const Neutral Direction = 3 Neutral means that text contains no left-to-right and right-to-left characters and that no default direction has been set.
const NSM Class = 12 // NonspacingMark
const ON Class = 10 // OtherNeutral
const PDF Class = 20 // PopDirectionalFormat
const PDI Class = 24 // PopDirectionalIsolate
const R Class = 1 // RightToLeft
func ReverseString(s string) string ReverseString reverses the order of characters in s and returns a new string. Modifiers will still follow the runes they modify. Brackets are replaced with their counterparts.
const RightToLeft Direction = 1 RightToLeft indicates the text contains no left-to-right characters and that either there are some right-to-left characters or the option DefaultDirection(RightToLeft) was passed.
const RLE Class = 19 // RightToLeftEmbedding
const RLI Class = 22 // RightToLeftIsolate
const RLO Class = 17 // RightToLeftOverride
const S Class = 8 // SegmentSeparator
const UnicodeVersion = "12.0.0" UnicodeVersion is the Unicode version from which the tables in this package are derived.
const WS Class = 9 // WhiteSpace