base38: reassign alphabet and numbers

It changes from " 0-9?a-z" to ".0-9a-z~". The default or placeholder
changes from " " to "." so it's now always visible. The wildcard changes
from "?" to "~" so it's now sorted last.
This commit is contained in:
Nigel Tao committed 2024-08-26 12:30:20 +10:00
1 parent e12f10eef0
commit bd42fa7af2
18 files changed
+235 -212

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ func main1() error {
args := os.Args
if len(args) > 1 {
for _, arg := range args[1:] {
arg := (strings.ToLower(arg) + " ")[:4]
arg := (strings.ToLower(arg) + "....")[:4]
if code, ok := base38.Encode(arg); ok {
code0 := fmt.Sprintf("0x%06X", code)
code1 := fmt.Sprintf("0x%08X", code<<10)