dry

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ceil added in v0.13.0

func Ceil(x, d int64) int64

Ceil returns integer greater or equal to x and denominator d division. Works only with x >= 0 and d > 0. It returns 0 with other values.

func CeilToMultiplier added in v0.12.0

func CeilToMultiplier(x, m int64) int64

CeilToMultiplier returns the integer greater or equal to x and multiplier m product. Works only with x >= 0 and m > 0. It returns 0 with other values.

func FloorToMultiplier added in v0.13.0

func FloorToMultiplier(x, m int64) int64

FloorToMultiplier returns the integer less or equal to x and multiplier m product. Works only with x >= 0 and m > 0. It returns 0 with other values.

func GCD added in v0.12.0

func GCD(a, b int64) int64

GCD returns the absolute greatest common divisor calculated via Euclidean algorithm

func LCM added in v0.12.0

func LCM(a, b int64) int64

LCM returns the absolute least common multiple of 2 integers via GDB

func Max

func Max(x, y int64) int64

Max returns the larger of x or y.

func Min added in v0.12.0

func Min(x, y int64) int64

Min returns the lower of x or y.

func RemoveEmptyStrings

func RemoveEmptyStrings(stringList []string) []string

RemoveEmptyStrings removes empty strings from list and returns truncated slice

func UnsafeString

func UnsafeString(b []byte) string

UnsafeString returns string object from byte slice without copying

func UnsafeStringBytes added in v0.13.4

func UnsafeStringBytes(s *string) []byte

UnsafeStringBytes returns the string bytes

Types

This section is empty.

Jump to

Keyboard shortcuts

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