confusable

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MPL-2.0 Imports: 5 Imported by: 3

Documentation

Overview

Package confusable implements confusable detection according to UTS #39.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confusable

func Confusable(x, y string) bool

Confusable checks if two strings are confusable.

func GetReplacement

func GetReplacement(input rune) string

func Skeleton

func Skeleton(input string) string

Skeleton is the skeleton function defined in UTS #39.

If two strings have the same skeleton, they're considered confusable. The skeleton strings are not intended for displaying to users.

See https://www.unicode.org/reports/tr39/#Confusable_Detection for more info.

func SkeletonBytes

func SkeletonBytes(input string) []byte

SkeletonBytes is the same as Skeleton, but it returns the skeleton as a byte slice.

func SkeletonHash

func SkeletonHash(input string) [32]byte

SkeletonHash returns the sha256 hash of the skeleton of the string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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