arkutils

package
v0.0.0-...-27a3170 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostAdds

func GetHostAdds(ipSegment string) ([]string, error)

*

  • 根据输入的IP网段,去除首尾,返回可用主机地址
  • @param ipSegment,如“192.168.10.23/24”
  • @return 包含IP地址的切片,如[]string{"192.168.10.1","192.168.10.1",.....,"192.168.10.254"}
  • @author gulilin 2023/7/14 0:21

func IfAinB

func IfAinB(A string, B []string) bool

*

  • 判断一个字符串是否在某个字符串切片中,若A为空字符串也返回false
  • @param A,目标字符串,集合,字符串切片
  • @return bool值
  • @author gulilin 2023/8/21 10:36

func IfSomeStrInLongString

func IfSomeStrInLongString(str string, sub ...string) bool

*

  • 查看某个长字符串中是否包含某几个字符串中的一个
  • @param str,目标字符串,sub,子字符串
  • @return 任意一个sub命中则返回true
  • @author gulilin 2023/12/13 17:09

func SliceRemoveBlankAndDuplicate

func SliceRemoveBlankAndDuplicate(originString []string) []string

*

  • 切片中去除空白和重复的字符串
  • @param 原始字符串切片
  • @return 处理后的字符串切片
  • @author gulilin 2023/12/17 10:29

Types

This section is empty.

Jump to

Keyboard shortcuts

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