inflect

package
v0.140.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 38

Documentation

Overview

Package inflect provides template functions for the inflection of words.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace struct{}

Namespace provides template functions for the "inflect" namespace.

func New

func New() *Namespace

New returns a new instance of the inflect-namespaced template functions.

func (*Namespace) Humanize

func (ns *Namespace) Humanize(v any) (string, error)

Humanize returns the humanized form of v.

If v is either an integer or a string containing an integer value, the behavior is to add the appropriate ordinal.

func (*Namespace) Pluralize

func (ns *Namespace) Pluralize(v any) (string, error)

Pluralize returns the plural form of the single word in v.

func (*Namespace) Singularize

func (ns *Namespace) Singularize(v any) (string, error)

Singularize returns the singular form of a single word in v.

Jump to

Keyboard shortcuts

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