array

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](arr []T, index int) T

Get 从给定的数组中获取指定索引的元素。 如果索引在数组的有效范围内,则返回该索引处的元素; 否则,返回该类型的零值。

参数: arr []T - 任意类型的切片。 index int - 要获取元素的索引。

返回值: T - 索引处的元素或该类型的零值。

Types

This section is empty.

Jump to

Keyboard shortcuts

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