utils

package
v1.6.29 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: BSD-2-Clause-Patent Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LEFT_PADDING_CHARACTER ...
	LEFT_PADDING_CHARACTER rune = 2 // Unicode U+0002: start of text

	// RIGHT_PADDING_CHARACTER ...
	RIGHT_PADDING_CHARACTER rune = 3 // Unicode U+0003: end of text
)

Variables

This section is empty.

Functions

func EuclideanDivision

func EuclideanDivision(numerator, denominator int) (quotient, remainder int, err error)

EuclideanDivision returns the integer tuple (quotient, remainder) from the division of the past integers

func FromHex

func FromHex(input string) ([]byte, error)

FromHex tries to convert an hexadecimal representation of a value to its corresponding byte array

func HexToInt

func HexToInt(input string) (number int, err error)

HexToInt tries to convert an hexadecimal representation of an integer to its value

func IntToHex

func IntToHex(input int) string

IntToHex converts an integer to its string representation in hexadecimal

func LeftPad

func LeftPad(str string, minLength int) string

LeftPad ...

func RegexSplit

func RegexSplit(text string, delimiter string) []string

RegexSplit splits a string using a regular expression. see https://stackoverflow.com/questions/4466091/split-string-using-regular-expression-in-go

func RightPad

func RightPad(str string, minLength int) string

RightPad ...

func ToHex

func ToHex(input []byte) string

ToHex converts a byte array to its string representation in hexadecimal

func Unpad

func Unpad(str string) string

Unpad ...

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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