str_util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StrUtil

type StrUtil struct{}

func (*StrUtil) ArrayFilter

func (s *StrUtil) ArrayFilter(data []string, info string) []string

ArrayFilter info 为空 则 过滤 空值 input []string{"", ""} return []string{}

func (*StrUtil) ArrayFilterAny

func (s *StrUtil) ArrayFilterAny(data []string, info []string) []string

ArrayFilterAny 过滤多个值

func (*StrUtil) ArrayKeys

func (s *StrUtil) ArrayKeys(data map[string]string) []string

返回一个map的 keys in map[string]string{} return []string{}

func (*StrUtil) InArray

func (s *StrUtil) InArray(str string, data []string) bool

func (*StrUtil) Index

func (s *StrUtil) Index(find interface{}, data []interface{}) []int

Index 返回某个数据的 key 值

func (*StrUtil) Unique

func (s *StrUtil) Unique(data []string) []string

func (*StrUtil) UniqueAny

func (s *StrUtil) UniqueAny(data []interface{}) []string

interface 排重 in []interface{1, "1", 2, "2", "a", "a", 1.12, "1.12"} return []interface{"1", "2", "a"}

Jump to

Keyboard shortcuts

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