Documentation
¶
Index ¶
Constants ¶
View Source
const (
// AlphanumericCharset is the character set used to generate random UTF-8 safe strings
AlphanumericCharset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
)
Variables ¶
View Source
var (
ErrNilStructField = errors.New("struct field is nil")
)
Functions ¶
func Repeat ¶
func Repeat(s string, n int, separator gostringsseparator.Separator) string
Repeat returns a new string consisting of the input string `s` repeated `n` times, separated by the specified separator.
Parameters:
s - the string to repeat n - the number of times to repeat the string separator - the separator to insert between repetitions
Returns:
A single string with `s` repeated `n` times, separated by `separator`.
func RepeatAsArray ¶
RepeatAsArray returns a pointer to a slice containing the input string `s` repeated `n` times.
Parameters:
s - the string to repeat n - the number of times to repeat the string
Returns:
A slice of strings, each element being `s`.
func ToCamelCase ¶ added in v0.1.16
ToCamelCase converts a string to CamelCase.
Parameters:
- s: The string to convert.
Returns:
- string: The converted string.
func ToSnakeCase ¶ added in v0.1.16
ToSnakeCase converts a string to snake_case.
Parameters:
- s: The string to convert.
Returns:
- string: The converted string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.