normalizer

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInert

func IsInert(c rune, mode Mode) bool

Types

type CheckResult

type CheckResult int

*

const (
	/**
	 * The input string is not in the normalization form.
	 * @stable ICU 2.0
	 */
	No CheckResult = iota
	/**
	 * The input string is in the normalization form.
	 * @stable ICU 2.0
	 */
	Yes
	/**
	 * The input string may or may not be in the normalization form.
	 * This value is only returned for composition forms like NFC and FCC,
	 * when a backward-combining character is found for which the surrounding text
	 * would have to be analyzed further.
	 * @stable ICU 2.0
	 */
	Maybe
)

func QuickCheck

func QuickCheck(c rune, mode Mode) CheckResult

type Mode

type Mode int32

*

  • Constants for normalization modes.
  • @deprecated ICU 56 Use unorm2.h instead.
const (
	/** No decomposition/composition. @deprecated ICU 56 Use unorm2.h instead. */
	NormNone Mode = 1
	/** Canonical decomposition. @deprecated ICU 56 Use unorm2.h instead. */
	NormNfd Mode = 2
	/** Compatibility decomposition. @deprecated ICU 56 Use unorm2.h instead. */
	NormNfkd Mode = 3
	/** Canonical decomposition followed by canonical composition. @deprecated ICU 56 Use unorm2.h instead. */
	NormNfc Mode = 4
	/** Default normalization. @deprecated ICU 56 Use unorm2.h instead. */
	NormDefault Mode = NormNfc
	/** Compatibility decomposition followed by canonical composition. @deprecated ICU 56 Use unorm2.h instead. */
	NormNfkc Mode = 5
	/** "Fast C or D" form. @deprecated ICU 56 Use unorm2.h instead. */
	NormFcd Mode = 6
)

type Normalizer

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

func Nfc

func Nfc() *Normalizer

func Nfkc

func Nfkc() *Normalizer

func (*Normalizer) AddPropertyStarts

func (n *Normalizer) AddPropertyStarts(u *uset.UnicodeSet)

func (*Normalizer) CombiningClass

func (n *Normalizer) CombiningClass(c rune) uint8

func (*Normalizer) Decompose

func (n *Normalizer) Decompose(c rune) []rune

func (*Normalizer) GetFCD16

func (n *Normalizer) GetFCD16(c rune) uint16

func (*Normalizer) IsCompNo

func (n *Normalizer) IsCompNo(c rune) bool

Jump to

Keyboard shortcuts

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