gtbox_array

package
v0.1.90 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package gtbox_array 基于线程安全的 可变长 Array/slice 封装

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GTArray added in v0.1.39

type GTArray struct {
	// contains filtered or unexported fields
}

GTArray 基于线程安全的 可变长 Array/slice

func NewArray added in v0.1.39

func NewArray(len, cap int64) *GTArray

NewArray 新建一个可变长数组

func (*GTArray) Append added in v0.1.39

func (a *GTArray) Append(element interface{})

Append 增加一个元素

func (*GTArray) AppendMany added in v0.1.39

func (a *GTArray) AppendMany(elements ...interface{})

AppendMany 增加多个元素

func (*GTArray) Cap added in v0.1.39

func (a *GTArray) Cap() int64

Cap 返回容量

func (*GTArray) Get added in v0.1.39

func (a *GTArray) Get(index int64) interface{}

Get 获取某个下标的元素

func (*GTArray) Len added in v0.1.39

func (a *GTArray) Len() int64

Len 返回真实长度

func (*GTArray) ToString added in v0.1.39

func (a *GTArray) ToString() string

ToString 转换为字符串输出,主要用于打印

Jump to

Keyboard shortcuts

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