bib

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package bib contains functions for (English-language) bibliographic sorting of strings.

A bibliographic sort is one that ignores a leading article ("the," "a," "an") and treats leading numbers as if they're spelled out. Characters other than letters and digits are ignored, except that "&" is converted to the spelled-out word "and," and hyphens are converted to spaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(s string) string

Key converts an input string to a bibliographic sort key.

func Less

func Less(a, b string) bool

Less tells whether a comes before b in a bibliograhic sort.

func Sort

func Sort(strs []string)

Sort sorts the input slice bibliographically.

Types

This section is empty.

Jump to

Keyboard shortcuts

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