Next: iklib bytevectors valpred, Previous: iklib bytevectors comparison, Up: iklib bytevectors [Index]
These conversion functions work like bytevector->u8-list
and
u8-list->bytevector
. The following bindings are exported by the
library (vicare)
.
Given a bytevector representing a string in UTF-8 encoding: compute and return the length of the Scheme string required to hold the characters.
The optional handling-mode must be an error handling mode as
validated by the standard syntax error-handling-mode
; when not
given: it defaults to ‘raise’. This argument has the same meaning
it has for utf8->string
(see utf8->string).
Given a bytevector representing a string in UTF-16 encoding: compute the length of the Scheme string required to hold the characters and return it as non–negative fixnum.
All the arguments have the same meaning they have for
utf16->string
(see utf16->string).
Given a bytevector representing a string in UTF-32 encoding: compute the length of the Scheme string required to hold the characters and return it as non–negative fixnum.
All the arguments have the same meaning they have for
utf32->string
(see utf32->string).
Convert between a list of signed bytes and a bytevector.
Convert between a list of signed or unsigned 16-bit words and a bytevector in which the words are stored in little, big or native endianness.
Convert between a list of signed or unsigned 32-bit words and a bytevector in which the words are stored in little, big or native endianness.
Convert between a list of signed or unsigned 64-bit words and a bytevector in which the words are stored in little, big or native endianness.
Convert between a list of single–precision flonums and a bytevector in which the flonums are stored in little, big or native endianness.
Convert between a list of double–precision flonums and a bytevector in which the flonums are stored in little, big or native endianness.
Convert between a list of single–precision cflonums and a bytevector in which the cflonums are stored in little, big or native endianness, real part first.
Convert between a list of double–precision cflonums and a bytevector in which the flonums are stored in little, big or native endianness, real part first.
Return #t
if bytevector is a bytevector object.
Return #t
if bytevector can be interpreted as an ASCII
encoded string, otherwise return #f
. An octet chi is
considered an ASCII code point if:
(<= #x00 chi #x7F) ⇒ #t
Return #t
if bytevector can be interpreted as a Latin1
encoded string, otherwise return #f
. iklib chars unicode latin1 for the definition of Latin-1 encoding used by Vicare.
Convert to and from a Scheme bytevector containing octets and a Scheme bytevector containing the ASCII hexadecimal representation of the octets.
The input hex bytevector contains the uppercase or lowercase hexadecimal representation of the octets. The output hex bytevector contains the uppercase hexadecimal representation of octets.
If an error occurs in the conversion: the return value is #f
.
Convert to and from a Scheme bytevector containing octets and a Scheme bytevector containing the ASCII Base64 representation of the octets.
If an error occurs in the conversion: the return value is #f
.
Encode or decode a bytevector according to RFC 3986 URI percent encoding; return a bytevector. All the octets are encoded except the ones having the following ASCII representation:
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 -._~
Given a bytevector encoded according to to RFC 3986 URI percent encoding: return an encoded and normalised bytevector, octets that are encoded but should not are decoded.
Return #t
if the argument is a correctly percent–encoded
bytevector according to RFC 3986. This means every octet represents
either one of the following characters in ASCII encoding:
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 -._~
or it is part of a percent–encoded sequence defined by the following grammar:
pct-encoded = "%" HEXDIG HEXDIG HEXDIG = [0-9a-fA-F]
Next: iklib bytevectors valpred, Previous: iklib bytevectors comparison, Up: iklib bytevectors [Index]