Utilities basexx

# Basexx - Convert between digit strings and various number bases

This is basexx, a package for converting numbers to digit strings in various bases and vice versa.

## Usage

To get the Base30 encoding of the number 412:

`result, err := basexx.Digits(412, basexx.Base30)`

To decode the base30 digit string `"fr"`:

`result, err := basexx.Value("fr", basexx.Base30)`

To convert a digit string `x` in base `from` to a new digit string in base `to`:

```var (
src     = basexx.NewBuffer(x, from)
destbuf = make([]byte, basexx.Length(from, to, len(x)))
dest    = basexx.NewBuffer(destbuf, to)
)
_, err := Convert(dest, src)
if err != nil { ... }
result := dest.Written()```

To define your own new number base:

```// ReverseBase10 uses digits '9' through '0' just to mess with you.
type ReverseBase10 struct{}

func (ReverseBase10) N() int64 { return 10 }

func (ReverseBase10) Encode(val int64) (byte, error) {
if val < 0 || val > 9 {
return 0, errors.New("digit value out of range")
}
return byte('9' - val), nil
}

func (ReverseBase10) Decode(digit byte) (int64, error) {
if digit < '0’ || digit > '9' {
return 0, errors.New("invalid encoded digit")
}
return int64(9 - (digit - '0’))
}```
###### randstr is a module that contains functions for generating random strings.

randstr is a module that contains functions for generating random strings. The functions in this module uses the crypto/rand package. Installa

3 Nov 13, 2021
###### Simple go package which converts roman strings to integer

romanparse Simple go package which converts roman strings

2 Oct 6, 2021
###### Simple library to handle ANSI functions and parsing of color formatting strings

Emerald A basic color library for use in my Go projects, built on top of mgutz/ansi. Package ansi is a small, fast library to create ANSI colored stri

0 Nov 15, 2021
###### checkspaces is a checker for spaces between // and directives.

checkspaces checks if there is a space between // and directives.

2 Dec 10, 2021
###### CSPFinder is a tool to compare ROI of selling Cash Secure Put options between different tickers for different expiry dates.

CSPFinder is a tool to compare ROI of selling Cash Secure Put options between different tickers for different expiry dates. It is intended to help open new cash secured put positions.

26 Dec 21, 2021
###### Slice conversion between primitive types

sliceconv Sliceconv implements conversions to and from string representations of primitive types on entire slices. The package supports types int, flo

7 May 1, 2021

4 Sep 9, 2021
###### krconv -- Convert kana-character to roman-alphabet

krconv -- Convert kana-character to roman-alphabet Convert kana-characters to roman-alphabets (by hepburn romanization) This package is required Go 1.

3 Oct 13, 2021
###### Package strnaming is used to Convert string to camelCase, snake_case, kebab-case.

strnaming Package strnaming is used to Convert string to camelCase, snake_case, kebab-case. Contents strnaming Contents API Examples Install Quick sta

2 Oct 24, 2021
###### Convert Gitignore to Glob patterns in Go

globify-gitignore Convert Gitignore to Glob patterns A Go

5 Nov 8, 2021
###### go-to64 analyzes Golang main package to convert int/uint to int64/uint64.

go-to64 About go-to64 analyzes Golang main package to convert int/uint to int64/uint64. This is an experiment tool, so be very careful. In a 32-bit en

1 Oct 31, 2021
###### A Go utility to convert Go example tests into jupyter notebooks.

go2colab Scientists (my main project's users) love jupyter notebook tutorials pkg.dev.go's runnable playground doesn't support file IO but I love exam

2 Nov 8, 2021
###### Convert dates from or to 31 calendars in Go. Implements the functions discussed in Reingold/Dershowitz 2018.

libcalcal - Calendrical calculations in Go About libcalcal implements in Go the functions described and presented in: Reingold, Edward M., and Nachum

1 Dec 30, 2021
###### A tools web api bases golang

1. tools-api 一个基于golang的开源web服务，专注于提供各类API以便在日常开发中提高生产效率 2. 部署 下载二进制程序后直接运行即可 ./go-tools-api 3. 二次开发 3.1. 环境依赖 Go版本 go version go1.15.2 linux/amd64 环境

0 Dec 6, 2021
###### PKSUID is a small extension for KSUID (K-Sortable Globally Unique IDs) which allows prefixing it with arbitrary up to 16 bytes strings

PKSUID is a small extension for KSUID (K-Sortable Globally Unique IDs) which allows prefixing it with arbitrary up to 16 bytes strings

1 Nov 2, 2021
###### A program to create assembly 8086 strings to print without using any printing/strings related function but only mov-xchg-int and loops

Assembly String builder tool A program to create assembly 8086 strings to print without using any printing/strings related function but only mov-xchg-

2 Nov 11, 2021
###### Convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)

go2struct Convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command under your project: go get

99 Dec 16, 2021
###### Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)

go2struct-tool Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command und

1 Dec 16, 2021
###### repin is a tool to replace strings between keyword pair.

repin repin is a tool to replace strings between keyword pair. tl;dr repin is a tool that makes it easy to write operations that can be written in GNU

1 Jan 7, 2022
###### Read data from rss, convert in pdf and send to kindle. Amazon automatically convert them in azw3.

Kindle-RSS-PDF-AZW3 The Kindle RSS PDF AZW3 is a personal project. The Kindle RSS PDF AZW3 is a personal project. I received a Kindle for Christmas, a

0 Jan 10, 2022
###### :handbag: Cache arbitrary data with an expiration time.

cache Cache arbitrary data with an expiration time. Features 0 dependencies About 100 lines of code 100% test coverage Usage // New cache c := cache.N

99 Jan 13, 2022
###### Arbitrary-precision fixed-point decimal numbers in go

decimal Arbitrary-precision fixed-point decimal numbers in go. Note: Decimal library can "only" represent numbers with a maximum of 2^31 digits after

3.7k Jan 19, 2022
###### smartcrop finds good image crops for arbitrary crop sizes

smartcrop smartcrop finds good image crops for arbitrary sizes. It is a pure Go implementation, based on Jonas Wagner's smartcrop.js Image: https://ww

1.6k Jan 14, 2022
###### Arbitrary transformations of JSON in Golang

kazaam Description Kazaam was created with the goal of supporting easy and fast transformations of JSON data with Golang. This functionality provides

216 Jan 13, 2022
###### An arbitrary-precision decimal floating-point arithmetic package for Go

decimal Package decimal implements arbitrary-precision decimal floating-point arithmetic for Go. Rationale How computers represent numbers internally

23 Nov 16, 2021
###### An arbitrary-precision decimal floating-point arithmetic package for Go

decimal Package decimal implements arbitrary-precision decimal floating-point arithmetic for Go. Rationale How computers represent numbers internally

23 Nov 16, 2021
###### Arbitrary-precision fixed-point decimal numbers in go

decimal Arbitrary-precision fixed-point decimal numbers in go. Note: Decimal library can "only" represent numbers with a maximum of 2^31 digits after

3.7k Jan 16, 2022
###### Arbitrary-precision decimals for Go

apd apd is an arbitrary-precision decimal package for Go. apd implements much of the decimal specification from the General Decimal Arithmetic descrip

379 Jan 12, 2022
###### Arbitrary expression evaluation for golang

govaluate Provides support for evaluating arbitrary C-like artithmetic/string expressions. Why can't you just write these expressions in code? Sometim

2.2k Jan 16, 2022