bidih

package
v0.0.0-...-61d31b1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package bidih implements Unicode bidirectional algorithm (TR9) also known as BIDI. For more information see http://unicode.org/reports/tr9 . Currently this package under development and is not ready for production use!!!

Index

Constants

View Source
const MaxDepth = 125

Maximum explicit embedding level.

Variables

This section is empty.

Functions

func Parse

func Parse(str string, paragraphEmbeddingLevel EmbeddingLevel) []rune

func ParseParagraph

func ParseParagraph(runes []rune, paragraphLevel EmbeddingLevel, lineBreaker LineBreaker)

func ParseParagraphExtended

func ParseParagraphExtended(runes []rune, paragraphLevel EmbeddingLevel, lineBreaker LineBreaker) (order []int)

Types

type EmbeddingLevel

type EmbeddingLevel uint8
const (
	LeftToRightParagraph   EmbeddingLevel = 0
	RightToLeftParagraph   EmbeddingLevel = 1
	MaxEmbeddingLevel      EmbeddingLevel = 125
	AutoParagraphDirection EmbeddingLevel = mathh.MaxUint8
)

type LineBreaker

type LineBreaker func(runes []rune) (lineLengths []int)

type Text

type Text struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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