chunks

package
v0.0.140 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 2 Imported by: 2

Documentation

Overview

Package chunks provides functions for dividing a one-dimensional slice into several pieces

Index

Constants

View Source
const TwoParts = 2

Variables

This section is empty.

Functions

func ReverseFullBytes added in v0.0.116

func ReverseFullBytes(in []byte) []byte

ReverseFullBytes reverse full slice []byte{1,2,3,4,5,6} -> []byte{6,5,4,3,2,1}

func SplitBytes added in v0.0.116

func SplitBytes(in []byte, limit int) [][]byte

SplitBytes dividing a one-dimensional slice []byte into several pieces

func SplitInt64 added in v0.0.112

func SplitInt64(in []int64, limit int) [][]int64

SplitInt64 dividing a one-dimensional slice []int64 into several pieces

func SplitStr added in v0.0.112

func SplitStr(s string, limit int) []string

SplitStr dividing a string into several pieces

func SwapHalfBytes added in v0.0.116

func SwapHalfBytes(in []byte) ([]byte, error)

SwapHalfBytes reverse two halfs slice []byte{1,2,3,4,5,6} -> []byte{4,5,6,1,2,3}

Types

This section is empty.

Jump to

Keyboard shortcuts

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