rangetable

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package rangetable provides utilities for creating and inspecting unicode.RangeTables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assigned

func Assigned(version string) *unicode.RangeTable

Assigned returns a RangeTable with all assigned code points for a given Unicode version. This includes graphic, format, control, and private-use characters. It returns nil if the data for the given version is not available.

func Merge

func Merge(ranges ...*unicode.RangeTable) *unicode.RangeTable

Merge returns a new RangeTable that is the union of the given tables. It can also be used to compact user-created RangeTables. The entries in R16 and R32 for any given RangeTable should be sorted and non-overlapping.

A lookup in the resulting table can be several times faster than using In directly on the ranges. Merge is an expensive operation, however, and only makes sense if one intends to use the result for more than a couple of hundred lookups.

func New

func New(r ...rune) *unicode.RangeTable

New creates a RangeTable from the given runes, which may contain duplicates.

func Visit

func Visit(rt *unicode.RangeTable, fn func(rune))

Visit visits all runes in the given RangeTable in order, calling fn for each.

Types

This section is empty.

Jump to

Keyboard shortcuts

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