]> git.lizzy.rs Git - plan9front.git/commit
libc: add encode(2) variants for custom alphabets
authorOri Bernstein <ori@eigenstate.org>
Sat, 3 Jul 2021 20:03:17 +0000 (20:03 +0000)
committerOri Bernstein <ori@eigenstate.org>
Sat, 3 Jul 2021 20:03:17 +0000 (20:03 +0000)
commite934530ee4512f033952e4efa80a80058607b741
tree2bde95220e1d5e26000286a7f04b93431d8121c8
parentc848ca62673689df20e7fef74d1d5180f37fcea6
libc: add encode(2) variants for custom alphabets

There are a number of alphabets in common use for base32
and base64 encoding, such as url-safe encodings.

This adds support for passing a function to encode into
arbitary alphabets.
sys/include/libc.h
sys/man/2/encode
sys/src/libc/port/u32.c
sys/src/libc/port/u64.c