I think I’ve been staring at pattern matches so long I’ve started to go blind. What I’d like to do is to inspect the code point for a character and then concatenate the character onto an accumulator.
iex> acc = "" iex> <<x::utf8, rest::binary>> = "über" iex> x 252 # <-- the code point iex> acc <> <<x>> # <-- how to concatenate the ü ? <<252>> iex> acc == "ü" false # nope.
It’s like I need the opposite of the
? where I can convert a code point into a binary. Can someone illuminate me while I soak my head in coffee? Thanks!