titlers

package
v0.0.0-...-6d6105d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package titlers expose utilities to "title-ize" headings.

A Titler knows how to transform a string using the Title(string) string method.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaseTitler

type CaseTitler struct {
	cases.Caser
}

CaseTitler returns a titler based on golang.org/x/text/cases.Caser.

func NewCaseTitler

func NewCaseTitler(tag language.Tag, opts ...cases.Option) *CaseTitler

func (*CaseTitler) Title

func (t *CaseTitler) Title(name string) string

type DefaultTitler

type DefaultTitler struct {
}

DefaultTitler formats headers and footers.

It replaces _ , . and spaces.

func NewDefault

func NewDefault() *DefaultTitler

func (*DefaultTitler) Title

func (t *DefaultTitler) Title(name string) string

Jump to

Keyboard shortcuts

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