strings

package
v0.37.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(s string) string

Normalize returns a copy of the string s with the first word mapped to its title case. It uses language.Und for word boundaries. For a more general solution, see NormalizeWithLanguage.

func NormalizeWithLanguage

func NormalizeWithLanguage(s string, lang language.Tag) string

NormalizeWithLanguage returns a copy of the string s with the first word mapped to its title case. If lang is not nil, it is used to determine the language for which the case transformation should be performed. If lang is nil, language.Und is used.

func Title

func Title(s string) string

Title returns a copy of the string s with all Unicode letters that begin words mapped to their title case. It uses language.Und for word boundaries. For a more general solution, see TitleWithLanguage.

func TitleWithLanguage

func TitleWithLanguage(s string, lang language.Tag) string

TitleWithLanguage returns a copy of the string s with all Unicode letters that begin words mapped to their title case.

Types

This section is empty.

Jump to

Keyboard shortcuts

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