Skip to content

Instantly share code, notes, and snippets.

View splatteredbits's full-sized avatar

Aaron Jensen splatteredbits

View GitHub Profile
@splatteredbits
splatteredbits / Convert-Radix.ps1
Last active January 20, 2023 03:47
Converts a number into a string using an arbitrary radix/base from 2 to 80. Uses all characters allowed by Windows, macOS, and Linux.
function Convert-Radix
{
<#
.SYNOPSIS
Converts a number to a string using an arbitrary radix/base.
.DESCRIPTION
The `Convert-Radix` function converts a number to a string, using an arbitrary radix/base. The resulting string can
be used as a filename. The function uses letters a-z then characters "!#$%&''()+,-;=@^_`{}~", for numbers
above 9 and below 60. It doesn't use upper case letters (because Windows is case-insensitive) and characters that