Hello,

Wanting to escape URIs in our Web.pm project, I would like to
implement unpack("H*", $str) in Rakudo:

  say unpack("H*", "☺"); # should print 'e298ba'

What facilities exist in Parrot (or, more precisely, PIR), to extract
the list of bytes making up a string? I'd need something like
to_bytes.

Bonus points for answering with working PIR code, of course.

(I asked this question on IRC last week but didn't get a conclusive
answer: <http://irclog.perlgeek.de/parrot/2009-03-17#i_994363>)

// Carl
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to