(bitset->bytes bitset)
Creates a sequence of bytes to represent the given <bitset> (sequence of ones and zeros) Pads with zeros when necessary to complete a byte. --------------------------------- bitset -> bytes --------------------------------- [0 0 0 0 0 0 0 1] -> [2r00000001] [0 1 1 0 1 1 0 1] -> [2r01101101] ---------------------------------
(byte->binary-str b)
Creates a bitset string from byte <b> -------------------------- byte -> binary-str -------------------------- [2r00000001] -> '00000001' [2r01101101] -> '01101101' --------------------------
(byte->bitset* b)
Creates a bitset from byte <b> --------------------------------- byte -> bitset --------------------------------- 2r00000001 -> [0 0 0 0 0 0 0 1] 2r01101101 -> [0 1 1 0 1 1 0 1] ---------------------------------
(byte->ubyte x)
NOTE: Java doesn't support unsigned bytes so int must be used to get an unsigned byte
Get the unsigned value of byte <b>. ---------------------- byte -> unsigned-int ---------------------- 110 -> 110 0 -> 0 -1 -> 255 ---------------------- NOTE: Java doesn't support unsigned bytes so int must be used to get an unsigned byte
(bytes->bitset bytes)
Creates a bitset from a seq of <bytes> --------------------------------- bytes -> bitset --------------------------------- [2r00000001] -> [0 0 0 0 0 0 0 1] [2r01101101] -> [0 1 1 0 1 1 0 1] ---------------------------------
(char->digit c radix)
Given a <radix>, convert character <c> to a digit.
Given a <radix>, convert character <c> to a digit.
(nibbles->chars nibbles)
(nibbles->chars nibbles radix)
Returns a seq of chars from a sequence (or array) of <nibbles> with <radix> base. If radix is not supplied, 10 is assumed. -------------------------------------------------- nibbles -> chars -------------------------------------------------- [1 0] -> (1 0) ... <radix> 16 (hex) [10 11 1 2 3] -> (A B 1 2 3) ... <radix> 16 (hex) [1 0] -> (1 0) ... <radix> 2 (binary) [1 0 0 1] -> (1 0 0 1) ... <radix> 2 (binary) [1 0] -> (1 0) ... <radix> 10 (decimal) [0 1 2 3 4 5] -> (0 1 2 3 4 5) ... <radix> 10 (decimal) --------------------------------------------------
(nibbles->str nibbles)
(nibbles->str nibbles radix)
Returns a string from a sequence (or array) of <nibbles> with <radix> base. If radix is not supplied, 10 is assumed -------------------------------------------------- nibbles -> str -------------------------------------------------- [1 0] -> '10' ... <radix> 16 (hex) [10 11 1 2 3] -> 'AB123' ... <radix> 16 (hex) [1 0] -> '10' ... <radix> 2 (binary) [1 0 0 1] -> '1001' ... <radix> 2 (binary) [1 0] -> '10' ... <radix> 10 (decimal) [0 1 2 3 4 5] -> '012345' ... <radix> 10 (decimal) --------------------------------------------------
(str->nibbles s)
(str->nibbles s radix)
Returns a sequence of <nibbles> with <radix> base from a string If radix is not supplied, 10 is assumed. -------------------------------------------------- str -> nibbles -------------------------------------------------- '10' -> [1 0] ... <radix> 16 (hex) 'AB123' -> [10 11 1 2 3] ... <radix> 16 (hex) '10' -> [1 0] ... <radix> 2 (binary) '1001' -> [1 0 0 1] ... <radix> 2 (binary) '10' -> [1 0] ... <radix> 10 (decimal) '012345' -> [0 1 2 3 4 5] ... <radix> 10 (decimal) --------------------------------------------------
(ubyte->byte b)
Get the signed byte value of an unsigned int <x>. ----------------- int -> byte ----------------- 0 -> 0 127 -> 127 -128 -> -128 255 -> -1 -129 -> Exception -----------------
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close