fold

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package fold implements operations that map similar characters to a common target. These operations are called character foldings, and can be used to ignore certain distinctions between similar characters.

Each folder implements the transform.Transform interface.

DISCLAIMER: these folders are based on suggested foldings that appear in withdrawn drafts of Unicode technical reports. They may not be complete. Their names come from those technical reports.

WARNING: folding is NOT appropriate for secure contexts - see x/text/secure/precis instead.

See, for important commentary: - Unicode Technical Report 30: CHARACTER FOLDINGS (withdrawn, draft) - Unicode Technical Report 25: CHARACTER FOLDINGS (draft)

Index

Constants

This section is empty.

Variables

View Source
var Accents = accents

Accents is a transformer that removes accents from Latin/Greek/Cyrillic characters.

View Source
var CanonicalDuplicates = canonicalDuplicates

CanonicalDuplicates is a transformer that folds duplicate singletons (usually when the same character, for historical reasons, has two different code points) (e.g. Ohm => Omega)

View Source
var Dashes = dashes

Dashes is a transformer that folds everything in Unicode class Pd ("dash punctuation") to hyphen-minus '-'.

View Source
var Digits = digits

Digits is a transformer that folds digits in a native language or a typographical context to a substitute ASCII digit. Note that this maps to Unicode code points for the digits '0' to '9', not to the codepoints with integer values 0 to 9.

View Source
var GreekLetterforms = greekLetterforms

GreekLetterforms is a transformer that folds alternative Greek letterforms e.g. 'ϐ' to 'β'.

View Source
var HebrewAlternates = hebrewAlternates

HebrewAlternates is a transformer that folds e.g. wide Hebrew characters to non-wide variants.

View Source
var Jamo = jamo

Jamo folding converts from the Hangul Compatibility Jamo Unicode block to the Hangul Jamo Unicode block.

View Source
var Math = math

Math folding converts font variants, excluding the HebrewAlternates.

View Source
var NoBreak = noBreak

NoBreak folding converts non-breaking space and non-breaking hyphens.

View Source
var Positional = positional

Positional folding performs positional forms folding including Arabic ligatures.

View Source
var Small = small

Small folding converts small variant forms into normal forms.

View Source
var Space = space

Space folding converts all spaces to a single 0x0020 space.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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