label

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 3 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package label writes the labels a reader sees in front of list items: bullets, and numbers as letters and Roman numerals. Moved here from go-fast-ooxml and go-fast-msbin (internal/label, the same in both), with Alpha, the lettering HTML, RTF and OpenDocument use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alpha

func Alpha(v int) string

Alpha writes 1 as A, 26 as Z, 27 as AA, 28 as AB: it counts in base 26 without a zero, as CSS's upper-alpha, RTF and OpenDocument (without letter synchronisation) do. It returns "" for a number below 1.

func Bullet

func Bullet(text, font string) string

Bullet returns the character a reader sees for a bullet definition. Bullets are usually stored as a code of a symbol font, often in the private range; the code is translated by the font's table, and a code with no character, or a bullet with nothing to show, becomes a plain bullet.

func Letters

func Letters(v int) string

Letters writes 1 as A, 26 as Z, 27 as AA, 28 as BB: Office repeats the letter, it does not count in base 26 (see Alpha). It returns "" for a number it cannot write.

func Roman

func Roman(v int) string

Roman writes a number from 1 to 3999 in capital Roman numerals, and "" for any other.

Types

This section is empty.

Jump to

Keyboard shortcuts

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