JanetDocsSourcePlaygroundTutorialsI'm Feeling luckyCommunityGitHub sign in

buffer/bit

core-api


    cfunction
    src/core/buffer.c on line 582, column 1

    (buffer/bit buf bit-index)

    Gets the bit at `bit-index` in a buffer, `buf`. Returns true if the 
    bit is set, false if not.


4 examplesSign in to add an example
Loading...
(buffer/bit (buffer/new-filled 1 (chr "0")) 4)
# => true
sogaiuPlayground
(buffer/bit (buffer/new-filled 1 48) 4)
# => true
sogaiuPlayground
(buffer/bit @"0" 4)
# => true
sogaiuPlayground
(buffer/bit @"1" 0)
# => true
sogaiuPlayground