Documentation
¶
Overview ¶
Utility to manipulate string.
Index ¶
- Constants
- func Contact(sources ...any) string
- func Format(source string, name string, value any) string
- func Formats(source string, params map[string]any) string
- func From(value any) string
- func IsEmpty(source string) bool
- func IsNotEmpty(source string) bool
- func PadLeft(s, pad string, length int) string
- func PadRight(s, pad string, length int) string
- func Padding(s, pad string, length int, isRight bool) string
- func RepeatBytes(char byte, times int) (chars []byte)
- func RepeatRune(char rune, count int) (chars []rune)
- func WrapTag(s, tag string) string
Constants ¶
View Source
const Empty = ""
Represents the emptry string.
Variables ¶
This section is empty.
Functions ¶
func Format ¶
Format source string that instead given name in curly brackets by given value.
Example:
Format("abc {name}", "name", 1) -> "abc 1"
func IsNotEmpty ¶
Identify whether the source string is not empty.
func RepeatBytes ¶ added in v0.1.1
RepeatBytes repeat a byte char.
func RepeatRune ¶ added in v0.1.1
RepeatRune repeat a rune char.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.