utilgo.mau.fi/util/unicodeurls Index | Files

package unicodeurls

import "go.mau.fi/util/unicodeurls"

Package unicodeurls contains URLs for Unicode data files. It is meant to be used in code generators that parse the files.

Index

Constants

const Confusables = "https://www.unicode.org/Public/security/" + UnicodeVersion + ".0/confusables.txt"
const EmojiTest = "https://unicode.org/Public/emoji/" + UnicodeVersion + "/emoji-test.txt"
const EmojiVariationSequences = "https://www.unicode.org/Public/" + UnicodeVersion + ".0/ucd/emoji/emoji-variation-sequences.txt"
const UnicodeVersion = "16.0"

Functions

func ParseHex

func ParseHex(parts []string) string

ParseHex parses a list of Unicode codepoints encoded as hex into a string

func ReadDataFile

func ReadDataFile(url string, processor func(string))

ReadDataFile fetches a data file from a URL and processes it line by line with the given processor function.

func ReadDataFileList

func ReadDataFileList[T any](url string, processor func(string) (T, bool)) (output []T)

ReadDataFileList fetches a data file from a URL and converts lines into array items with the given function.

func ReadDataFileMap

func ReadDataFileMap[Key comparable, Value any](url string, processor func(string) (Key, Value, bool)) (output map[Key]Value)

ReadDataFileMap fetches a data file from a URL and converts lines into a map with the given function.

Source Files

urls.go

Version
v0.8.6 (latest)
Published
Mar 16, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
1 week ago

Tools for package owners.