utils

package
v0.1.65 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstLetter

func FirstLetter(s string) string

FirstLetter returns the first letter of the string in lowercase (e.g. "UserAccount" -> "u")

func GetDirectoryOfCurrentFile

func GetDirectoryOfCurrentFile() string

GetDirectoryOfCurrentFile returns the directory of the current file

func IsSnakeCase added in v0.1.65

func IsSnakeCase(s string) bool

func SnakeToCamel

func SnakeToCamel(s string) string

SnakeToCamel converts a snake_case string to camelCase (e.g. "user_account" -> "userAccount")

func SnakeToFlat

func SnakeToFlat(s string) string

SnakeToFlat converts a snake_case string to flat case (e.g. "user_account" -> "UserAccount")

func SnakeToKebab

func SnakeToKebab(s string) string

SnakeToKebab converts a snake_case string to kebab-case (e.g. "user_account" -> "user-account")

func SnakeToPascal

func SnakeToPascal(s string) string

SnakeToPascal converts a snake_case string to PascalCase (e.g. "user_account" -> "UserAccount")

func TitleCase added in v0.1.65

func TitleCase(s string) string

TitleCase returns the string in title case (e.g. "user_account" -> "Useraccount")

Types

This section is empty.

Jump to

Keyboard shortcuts

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