slice

package
v0.0.0-...-40627cf Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package slice 封装golang切片类型,添加比较操作.

Index

Constants

View Source
const (
	CMPLarger  = +1 // 当前Slice大于目标字符串
	CMPSmaller = -1 // 当前Slice小于目标字符串
	CMPSame    = 0  // 当前Slice等于目标字符串
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Slice

type Slice []byte

Slice 是基于[]byte的切片类型,实现了其比较操作.

func (Slice) Compare

func (s Slice) Compare(b Slice) int

Compare 比较两个切片,返回两者比较结果. TODO user defined comparator

Jump to

Keyboard shortcuts

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