mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 20:40:28 +00:00
Add EncodeHex() and DecodeHex() to Redbean
This commit is contained in:
parent
00acd81b2f
commit
a186143f62
9 changed files with 97 additions and 13 deletions
|
@ -721,14 +721,21 @@ FUNCTIONS
|
|||
A granular. It can tell you if traffic originated from private
|
||||
networks, ARIN, APNIC, DOD, etc.
|
||||
|
||||
DecodeLatin1(iso-8859-1:str) → utf-8:str
|
||||
Turns ISO-8859-1 string into UTF-8.
|
||||
|
||||
EncodeHex(binary:str) → ascii:str
|
||||
Turns binary into ASCII base-16 hexadecimal lowercase string.
|
||||
|
||||
DecodeHex(ascii:str) → binary:str
|
||||
Turns ASCII base-16 hexadecimal byte string into binary string,
|
||||
case-insensitively. Non-hex characters may not appear in string.
|
||||
|
||||
DecodeBase64(ascii:str) → binary:str
|
||||
Turns ASCII into binary, in a permissive way that ignores
|
||||
characters outside the base64 alphabet, such as whitespace. See
|
||||
decodebase64.c.
|
||||
|
||||
DecodeLatin1(iso-8859-1:str) → utf-8:str
|
||||
Turns ISO-8859-1 string into UTF-8.
|
||||
|
||||
EncodeBase64(binary:str) → ascii:str
|
||||
Turns binary into ASCII. This can be used to create HTML data:
|
||||
URIs that do things like embed a PNG file in a web page. See
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue