utils

package
v0.0.0-...-6325967 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeSQLIdentifier

func EscapeSQLIdentifier(s string) string

EscapeSQLIdentifier escapes a SQL identifier with double quotes.

func GetFileExtension

func GetFileExtension(path string) string

GetFileExtension returns the file extension including the dot.

func HasExtension

func HasExtension(path, ext string) bool

HasExtension checks if a path has a specific extension.

func IsValidIdentifier

func IsValidIdentifier(s string) bool

IsValidIdentifier checks if a string is a valid Go identifier.

func PadString

func PadString(s string, length int, char string) string

PadString pads a string to a specific length with the given character.

func Pluralize

func Pluralize(word string) string

Pluralize converts a noun to its plural form (simplified).

func Singularize

func Singularize(word string) string

Singularize converts a plural noun to its singular form (simplified).

func StringToCamelCase

func StringToCamelCase(s string) string

StringToCamelCase converts snake_case to CamelCase.

func StringToKebabCase

func StringToKebabCase(s string) string

StringToKebabCase converts CamelCase to kebab-case.

func StringToSnakeCase

func StringToSnakeCase(s string) string

StringToSnakeCase converts CamelCase to snake_case.

func TruncateString

func TruncateString(s string, length int) string

TruncateString truncates a string to a specific length.

Types

This section is empty.

Jump to

Keyboard shortcuts

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