Documentation ¶
Index ¶
- func Addslashes(str string) string
- func Bin2hex(str string) (string, error)
- func Bindec(str string) (string, error)
- func Camel(str string) string
- func Chr(ascii int) string
- func CompareVersion(src, toCompare string) bool
- func Contains(s string, str string) int
- func ContainsLast(s string, str string) int
- func ContainsRune(s string, ch rune) int
- func Delimited(s string, delimiter uint8) string
- func Empty(val any) bool
- func Explode(delimiter, str string) []string
- func HTMLEntityDecode(str string) string
- func Hex2bin(data string) (string, error)
- func Htmlentities(str string) string
- func IsNil(i any) bool
- func IsNumeric(val any) bool
- func JSONDecode(data string, val any) error
- func JSONEncode(val any) string
- func Kebab(s string) string
- func Lcfirst(str string) string
- func LowerCamel(str string) string
- func MbStrlen(str string) int
- func Nl2br(str string, isXhtml bool) string
- func Ord(char string) int
- func PadBoth(value string, length int, pad string) string
- func PadLeft(value string, length int, pad string) string
- func PadRight(value string, length int, pad string) string
- func Random(n int, allowedChars ...[]rune) string
- func Repeat(str string, times int) string
- func Replace(search string, replace string, subject string) string
- func ReplaceNth(s, old, new string, n int) string
- func ScreamingDelimited(s string, delimiter uint8, ignore string, screaming bool) string
- func ScreamingKebab(s string) string
- func ScreamingSnake(s string) string
- func Snake(str string) string
- func SnakeWithIgnore(s string, ignore string) string
- func StrShuffle(str string) string
- func StrWordCount(str string) []string
- func StringsJoin(strs ...string) string
- func Stripos(haystack string, needle string, start ...int) int
- func Stripslashes(str string) string
- func Strlen(str string) int
- func Strpos(haystack string, needle string, start ...int) int
- func Strrev(str string) string
- func Strripos(haystack string, needle string, start ...int) int
- func Strrpos(haystack string, needle string, start ...int) int
- func Strstr(haystack string, needle string) string
- func Strtr(haystack string, params ...any) string
- func Strval(value any) string
- func Substr(str string, start int, length ...int) string
- func ToASCII(str string) string
- func ToLower(str string) string
- func ToUnicode(str string) string
- func ToUpper(str string) string
- func Ucfirst(str string) string
- func Ucwords(str string) string
- func UnicodeTo(str string) (string, error)
- func Uniqid(prefix string) string
- type S
- func (this S) Bool() (bool, error)
- func (this S) Bytes() []byte
- func (this S) DefaultBool(defaultVal bool) bool
- func (this S) DefaultFloat32(defaultVal float32) float32
- func (this S) DefaultFloat64(defaultVal float64) float64
- func (this S) DefaultInt(defaultVal int) int
- func (this S) DefaultInt64(defaultVal int64) int64
- func (this S) DefaultUint(defaultVal uint) uint
- func (this S) DefaultUint64(defaultVal uint64) uint64
- func (this S) Float32() (float32, error)
- func (this S) Float64() (float64, error)
- func (this S) GetParentDir() string
- func (this S) Int() (int, error)
- func (this S) Int64() (int64, error)
- func (this S) String() string
- func (this S) Substr(pos, length int) string
- func (this S) ToJSON(v any) error
- func (this S) Uint() (uint, error)
- func (this S) Uint64() (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceNth ¶
func ScreamingDelimited ¶
ScreamingDelimited
Types ¶
type S ¶
type S string
*
- 字符串类型转换 *
- @create 2021-8-28
- @author deatil
func (S) DefaultFloat32 ¶
转换为float32,如果出现错误则使用默认值
func (S) DefaultFloat64 ¶
转换为float64,如果出现错误则使用默认值
func (S) DefaultUint64 ¶
转换为uint64,如果出现错误则使用默认值
Click to show internal directories.
Click to hide internal directories.