Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .loadlib 'perl6_group'
- .sub 'main'
- # Example string (but do transcode to an encoding explicitly -
- # just so happens that it's utf8 by default in Parrot here.)
- $S0 = unicode:"öl"
- # Create byte view.
- $P0 = new ['ByteView']
- $P0 = $S0
- # Print the bytes.
- $I0 = $P0[0]
- say $I0
- $I0 = $P0[1]
- say $I0
- $I0 = $P0[2]
- say $I0
- .end
Add Comment
Please, Sign In to add comment