Documentation
¶
Overview ¶
Package strutil implements some string utility functions.
Index ¶
- func Camelize(s string, upper bool) string
- func IsDigitString(s string) bool
- func ShellEscape(s string) string
- func ShellEscapeExceptTilde(s string) string
- func SliceContain(slice []string, value string) bool
- func Underscore(s string, upper bool) string
- func UnsafeBytesToString(b []byte) string
- func UnsafeStringToBytes(s string) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Camelize ¶ added in v1.5.0
Camelize converts an ASCII string to camel case like string, and supports specifying the case of the first letter.
func IsDigitString ¶ added in v1.0.0
IsDigitString checks if a string only contains ASCII digits.
func ShellEscape ¶ added in v0.0.5
ShellEscape escapes a string for use in a shell command.
func ShellEscapeExceptTilde ¶ added in v0.0.5
ShellEscapeExceptTilde escapes a string for use in a shell command, except '~'.
func SliceContain ¶
SliceContain determines whether a string slice includes a certain value.
func Underscore ¶ added in v1.5.0
Underscore converts an ASCII string to snake case like string, and supports specifying the case of all letters.
func UnsafeBytesToString ¶ added in v1.2.0
UnsafeBytesToString converts byte slice to string without allocation. The bytes passed to function must not be modified afterwards.
func UnsafeStringToBytes ¶ added in v1.2.0
UnsafeStringToBytes converts string to byte slice without allocation.
Types ¶
This section is empty.