A64L(3)
π A64L(3) β a64l, l64a, l64a_r π
Okay bestie, this is the Library Functions Manual page for A64L(3) β the one and only. Itβs giving βconvert between a long integer and a base-64 ASCII string,β and Iβm obsessed. Letβs get into it. β¨
πΈ NAME πΈ
a64l, l64a, l64a_r β convert between a long integer and a base-64 ASCII string
π LIBRARY π
Standard C Library (libc, -lc)
π SYNOPSIS π
#include <stdlib.h>
long
a64l(const char *s);
char *
l64a(long int l);
int
l64a_r(long int l, char *buffer, int buflen);
π¦ DESCRIPTION π¦
These functions are used to maintain numbers stored in radix-64 ASCII characters. Itβs a notation by which 32-bit integers can be represented by up to six characters; each character represents a digit in radix-64 notation. If the type long contains more than 32 bits, only the low-order 32 bits are used for these operations. Periodt.
The characters used to represent βdigitsβ are . for 0, / for 1, 0 - 9 for 2 - 11, A - Z for 12 - 37, and a - z for 38 - 63. Thatβs the whole alphabet, and yes, it slays. π
a64l()β takes a pointer to a radix-64 representation, in which the first digit is the least significant, and returns a correspondinglongvalue. If the string pointed to byscontains more than six characters,a64l()uses the first six. If the first six characters of the string contain a null terminator,a64l()uses only characters preceding the null terminator.a64l()scans the character string from left to right with the least significant digit on the left, decoding each character as a 6-bit radix-64 number. If the typelongcontains more than 32 bits, the resulting value is sign-extended. The behavior ofa64l()is unspecified ifsis a null pointer or the string pointed to byswas not generated by a previous call tol64a(). β οΈl64a()β takes alongargument and returns a pointer to the corresponding radix-64 representation. The behavior ofl64a()is unspecified ifvalueis negative. β οΈ- The value returned by
l64a()is a pointer into a static buffer. Subsequent calls tol64a()may overwrite the buffer. So donβt be clingy with that pointer, bestie. π l64a_r()β performs a conversion identical to that ofl64a()and stores the resulting representation in the memory area pointed to bybuffer, consuming at mostbuflencharacters including the terminating NUL character.
π RETURN VALUES π
On successful completion, a64l() returns the long value resulting from conversion of the input string. If a string pointed to by s is an empty string, a64l() returns 0.
The l64a() function returns a pointer to the radix-64 representation. If value is 0, l64a() returns a pointer to an empty string.
π SEE ALSO π
π°οΈ HISTORY π°οΈ
The a64l(), l64a(), and l64a_r() functions are derived from NetBSD with modifications. They appeared in FreeBSD 6.1.
π AUTHORS π
The a64l(), l64a(), and l64a_r() functions were added to FreeBSD by Tom Rhodes <trhodes@FreeBSD.org>. Almost all of this manual page came from the POSIX standard.
Source/version vibes: Debian. Date: November 20, 2005. Page: A64L(3). Bye bestie β stay slay. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2005 Tom Rhodes
- Copyright (C) 2001-2004 by the Institute of
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms