inflector

package
v0.22.15 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 3 Imported by: 132

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Columnify

func Columnify(str string) string

Columnify strips invalid db identifier characters.

func Sanitize

func Sanitize(str string, removePattern string) (string, error)

Sanitize sanitizes `str` by removing all characters satisfying `removePattern`. Returns an error if the pattern is not valid regex string.

func Sentenize

func Sentenize(str string) string

Sentenize converts and normalizes string into a sentence.

func Snakecase

func Snakecase(str string) string

Snakecase removes all non word characters and converts any english text into a snakecase. "ABBREVIATIONS" are preserved, eg. "myTestDB" will become "my_test_db".

func UcFirst

func UcFirst(str string) string

UcFirst converts the first character of a string into uppercase.

Types

This section is empty.

Jump to

Keyboard shortcuts

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