Documentation ¶
Index ¶
- Constants
- func Buffer(size ...int) *strings.Builder
- func Bytes2String(b []byte) string
- func CamelCaseToSnakeCase(str string, delimiter ...string) string
- func Len(str string) int
- func Match(str, pattern string) bool
- func Md5(str string) string
- func Md5File(path string) (encrypt string, err error)
- func Pad(raw string, length int, padStr string, padType int) string
- func RegexExtract(pattern string, str string) ([]string, error)
- func RegexMatch(pattern string, str string) bool
- func RegexReplace(pattern string, str, repl string) (string, error)
- func RegexReplaceFunc(pattern string, str string, repl func(string) string) (string, error)
- func SnakeCaseToCamelCase(str string, ucfirst bool, delimiter ...string) string
- func String2Bytes(s string) []byte
- func Substr(str string, start int, length ...int) string
- func TrimSpace(s string) string
- func XSSClean(str string) string
Constants ¶
View Source
const ( // PadRight Right padding character PadRight int = iota // PadLeft Left padding character PadLeft )
Variables ¶
This section is empty.
Functions ¶
func CamelCaseToSnakeCase ¶
CamelCaseToSnakeCase camelCase To SnakeCase helloWorld/HelloWorld => hello_world
func RegexExtract ¶
RegexExtract extract matching text
func RegexReplace ¶
RegexReplace replacing matches of the Regexp
func RegexReplaceFunc ¶
RegexReplaceFunc replacing matches of the Regexp
func SnakeCaseToCamelCase ¶
SnakeCaseToCamelCase snakeCase To CamelCase: hello_world => helloWorld
func String2Bytes ¶
String2Bytes string to bytes remark: read only, the structure of runtime changes will be affected, the role of unsafe.Pointer will be changed, and it will also be affected
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.