fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 176: Hex string to byte array
Idiom # 176: Hex string to byte array
See
programming-idioms.org
:
Code
a := array s.byte_length/2 (i -> (s.substring 2*i 2*i+2).parse_i32_hex.val.as_u8)
What are effects?
Running Example
ex176 is s := "46757a696f6e" a := array s.byte_length/2 (i -> (s.substring 2*i 2*i+2).parse_i32_hex.val.as_u8) say a say (String.from_bytes a)
What are effects?
last changed: 2024-07-01
next: NYI: Idiom # 177: Find files with a given list of filename extensions