fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 275: Binary digits to byte array
Idiom # 275: Binary digits to byte array
See
programming-idioms.org
:
Code
s.as_codepoints .chunk 8 .map (x -> (x.foldf (+) "").parse_integer u8 2)
What are effects?
Runnable Example
ex275 is s := """ 00000000\ 11111111\ 01111111\ 00000001\ 00101010\ """ say (s.as_codepoints .chunk 8 .map (x -> (x.foldf (+) "").parse_integer u8 2) )
What are effects?
last changed: 2024-07-01
next: Idiom # 276: Insert an element in a set