Bytevector
Write a bytevector
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “ABC”.
Get a length of a bytevector
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Examples
value | length |
---|---|
#u8() | 0 |
#u8(0) | 1 |
#u8(0 0) | 2 |
#u8(0 0 0) | 3 |
Get a length of a bytevector
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Examples
vector | index |
---|---|
#u8(65) | 0 |
#u8(65 66) | 0 |
#u8(66 65) | 1 |
#u8(65 66 66) | 0 |
#u8(66 65 66) | 1 |
#u8(66 66 65) | 2 |