strutil

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2Float64 added in v0.2.25

func Bytes2Float64(bytes interface{}) (float64, error)

func Bytes2Int added in v0.2.25

func Bytes2Int(bytes interface{}) (int, error)

func Bytes2String added in v0.2.25

func Bytes2String(bytes interface{}) string

func Contains

func Contains(str string, ss []string) bool

Contains determines whether the str is in the strs.

func GetBytes added in v0.2.25

func GetBytes(bytes interface{}) []byte

func LCS

func LCS(s1 string, s2 string) string

LCS gets the longest common substring of s1 and s2. 最长公共子串 Refers to http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_substring.

func String2Bytes added in v0.2.25

func String2Bytes(s string) []byte

func String2Float64 added in v0.2.25

func String2Float64(s string) (float64, error)

func String2Int added in v0.2.25

func String2Int(s string) (int, error)

func String2Int64 added in v0.2.25

func String2Int64(str string) int64

func StringToFloat64 added in v0.2.25

func StringToFloat64(s string) float64

func StringToInt added in v0.2.25

func StringToInt(s string) int

func StringToUint added in v0.2.25

func StringToUint(s string) uint

func ToBytes

func ToBytes(str string) []byte

ToBytes converts the specified str to a byte array.

func ToStr

func ToStr(bytes []byte) string

FromBytes converts the specified byte array to a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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