util

package
v0.0.0-...-1876e9c Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LessTitle

func LessTitle(title1, title2 string) bool

LessTitle compares two titles and returns true if title1 is alphabetically before title2, ignoring preceding articles (e.g. "a", "an", "the"). It can be used to sort a slice as follows:

sort.Slice(titles, func(i, j int) bool {
	return util.LessTitle(titles[i], titles[j])
})

func MakeID

func MakeID(title string) string

MakeID converts the provided title into a suggested ID. Effectively, this converts it to PascalCase.

Types

This section is empty.

Jump to

Keyboard shortcuts

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