xstring

package
v0.11.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OmitDefaultAPI = jsoniter.Config{
	SortMapKeys:            true,
	UseNumber:              true,
	CaseSensitive:          true,
	EscapeHTML:             true,
	ValidateJsonRawMessage: true,
}.Froze()

OmitDefaultAPI ...

Functions

func Addr2Hex

func Addr2Hex(str string) (string, error)

Addr2Hex converts address string to hex string, only support ipv4.

func AnyBlank

func AnyBlank(ss []string) bool

AnyBlank return true if ss has empty element

func CallerName

func CallerName(skip int) string

CallerName ...

func FunctionName

func FunctionName(i interface{}) string

FunctionName ...

func Hex2Addr

func Hex2Addr(str string) (string, error)

Hex2Addr converts hex string to address.

func Json

func Json(obj interface{}) string

Json ...

func JsonBytes

func JsonBytes(obj interface{}) []byte

JsonBytes ...

func ObjectName

func ObjectName(i interface{}) string

ObjectName ...

func PrettyJSONBytes

func PrettyJSONBytes(obj interface{}) []byte

PrettyJSONBytes ...

func PrettyJson

func PrettyJson(obj interface{}) string

PrettyJson ...

func ToCamelCase

func ToCamelCase(str string) string

ToCamelCase 转为驼峰格式

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase 转为snake格式

Types

type Strings

type Strings []string

Strings ...

func Kick added in v0.4.2

func Kick(ss []string, remove func(item string) bool) Strings

func KickEmpty

func KickEmpty(ss []string) Strings

KickEmpty kick empty elements from ss

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL