utils

package
v2.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, str string) bool

Contains checks whether an array of strings contains an element.

func SaturateSub

func SaturateSub(coinsA sdk.Coins, coinsB sdk.Coins) sdk.Coins

SaturateSub subtracts a set of coins from another. If the amount goes below zero, it's set to zero.

Example: {2A, 3B, 4C} - {1A, 5B, 3D} = {1A, 4C}

func UintArrayToString

func UintArrayToString(uints []uint64, delim string) string

UintArrayToString joins an array of uint64 numbers into a string with the given delimiter.

Forked from https://stackoverflow.com/questions/37532255/one-liner-to-transform-int-into-string

Types

This section is empty.

Jump to

Keyboard shortcuts

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