lqstring

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlphanumeric

func IsAlphanumeric(str string) bool

IsAlphanumeric checks if a string contains only letters and numbers.

Parameters:

  • str: The string to check

Returns:

  • bool: true if the string contains only letters and numbers, false otherwise

func IsEmail

func IsEmail(str string) bool

IsEmail validates if a string is a valid email address.

Parameters:

  • str: The string to validate

Returns:

  • bool: true if the string is a valid email address, false otherwise

func IsNumeric

func IsNumeric(str string) bool

IsNumeric checks if a string contains only numeric characters.

Parameters:

  • str: The string to check

Returns:

  • bool: true if the string contains only numbers, false otherwise

func IsPlural

func IsPlural(str string) bool

IsPlural checks if a word is in plural form.

Parameters:

  • str: The word to check

Returns:

  • bool: true if the word is plural, false otherwise

func IsSingular

func IsSingular(str string) bool

IsSingular checks if a word is in singular form.

Parameters:

  • str: The word to check

Returns:

  • bool: true if the word is singular, false otherwise

func IsURL

func IsURL(str string) bool

IsURL validates if a string is a valid URL.

Parameters:

  • str: The string to validate

Returns:

  • bool: true if the string is a valid URL, false otherwise

func RandomString

func RandomString(length int) string

RandomString generates a random string of the specified length.

Parameters:

  • length: The desired length of the random string

Returns:

  • string: A random string containing letters

func ToCamelCase

func ToCamelCase(str string) string

ToCamelCase converts a string to camelCase format.

Parameters:

  • str: The string to convert

Returns:

  • string: The converted string in camelCase

func ToKebabCase

func ToKebabCase(str string) string

ToKebabCase converts a string to kebab-case format.

Parameters:

  • str: The string to convert

Returns:

  • string: The converted string in kebab-case

func ToPascalCase

func ToPascalCase(str string) string

ToPascalCase converts a string to PascalCase format.

Parameters:

  • str: The string to convert

Returns:

  • string: The converted string in PascalCase

func ToPlural

func ToPlural(str string) string

ToPlural converts a singular word to its plural form.

Parameters:

  • str: The singular word

Returns:

  • string: The plural form of the word

func ToSingular

func ToSingular(str string) string

ToSingular converts a plural word to its singular form.

Parameters:

  • str: The plural word

Returns:

  • string: The singular form of the word

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase converts a string to snake_case format.

Parameters:

  • str: The string to convert

Returns:

  • string: The converted string in snake_case

func UUID

func UUID() string

UUID generates a new UUID v4.

Returns:

  • string: A new UUID string

Types

This section is empty.

Jump to

Keyboard shortcuts

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