Documentation
¶
Index ¶
- func IsAlphanumeric(str string) bool
- func IsEmail(str string) bool
- func IsNumeric(str string) bool
- func IsPlural(str string) bool
- func IsSingular(str string) bool
- func IsURL(str string) bool
- func RandomString(length int) string
- func ToCamelCase(str string) string
- func ToKebabCase(str string) string
- func ToPascalCase(str string) string
- func ToPlural(str string) string
- func ToSingular(str string) string
- func ToSnakeCase(str string) string
- func UUID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAlphanumeric ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
ToCamelCase converts a string to camelCase format.
Parameters:
- str: The string to convert
Returns:
- string: The converted string in camelCase
func ToKebabCase ¶
ToKebabCase converts a string to kebab-case format.
Parameters:
- str: The string to convert
Returns:
- string: The converted string in kebab-case
func ToPascalCase ¶
ToPascalCase converts a string to PascalCase format.
Parameters:
- str: The string to convert
Returns:
- string: The converted string in PascalCase
func ToPlural ¶
ToPlural converts a singular word to its plural form.
Parameters:
- str: The singular word
Returns:
- string: The plural form of the word
func ToSingular ¶
ToSingular converts a plural word to its singular form.
Parameters:
- str: The plural word
Returns:
- string: The singular form of the word
func ToSnakeCase ¶
ToSnakeCase converts a string to snake_case format.
Parameters:
- str: The string to convert
Returns:
- string: The converted string in snake_case
Types ¶
This section is empty.