package confusable
import "go.mau.fi/util/confusable"
Package confusable implements confusable detection according to UTS #39.
Index ¶
- func Confusable(x, y string) bool
- func GetReplacement(input rune) string
- func Skeleton(input string) string
- func SkeletonBytes(input string) []byte
- func SkeletonHash(input string) [32]byte
Functions ¶
func Confusable ¶
Confusable checks if two strings are confusable.
func GetReplacement ¶
func Skeleton ¶
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 ¶
SkeletonBytes is the same as Skeleton, but it returns the skeleton as a byte slice.
func SkeletonHash ¶
SkeletonHash returns the sha256 hash of the skeleton of the string.
Source Files ¶
confusables.go skeleton.go
- Version
- v0.8.6 (latest)
- Published
- Mar 16, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 1 week ago –
Tools for package owners.