The Crystal programming language | http://crystal-lang.org | Fund Crystal's development: http://is.gd/X7PRtI | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/
$~
and $1
, $n
representing regex matches
pp "\xff\xfe".to_slice # => Bytes[255, 254]
"\u{ff}\u{fe}".to_utf16
to get the correct byte representation
String.from_utf16("\u{ff}\u{fe}".to_utf16).chars.map(&.ord) # => [255, 254]