unicodeurls

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

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

Index

Constants

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

Variables

This section is empty.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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