stringutil

package
v0.0.0-...-ef20d85 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeHtmlTag

func DeHtmlTag(html string) string

func FileNameAppend

func FileNameAppend(filename, subname string) string

FileNameAppend hello.jpg,_1 -> hello_1.jpg

func GbkToUtf8

func GbkToUtf8(s []byte) ([]byte, error)

func In

func In(n int, ints []int) bool

func IndexStrs

func IndexStrs(strs []string, str string) int

func IntsIntersect

func IntsIntersect(a, b []int) []int

func IntsSubstract

func IntsSubstract(a, b []int) []int

func IsUtf8

func IsUtf8(s []byte) bool

func JoinInt64s

func JoinInt64s(is []int64) string

func JoinInts

func JoinInts(is []int) string

func JoinSqlFields

func JoinSqlFields(prefix string, fields ...string) string

func JoinStrs

func JoinStrs(ks []string, sep string) string

func Json

func Json(v interface{}) string

func JsonPretty

func JsonPretty(v interface{}) string

func Max

func Max(a, b int) int

func SliceStr2Int

func SliceStr2Int(ss []string) []int

func ToInt

func ToInt(s string, dv ...int) int

func ToInts

func ToInts(ss []string) []int

func ToString

func ToString(value interface{}) (string, error)

func Utf8ToGbk

func Utf8ToGbk(s []byte) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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