fschmidt wrote
So now you want to name from_char() what you previously called to_chars() . I don't understand.
No. Please read the root post of this thread. We need a way to build a string with specific character codes. In java we can do this:
String literal = "\u2190\u2195";
How can we do this in Luan?
So my point was that we could have something like this:
local str = String.from_char(2190, 'UTF8') .. String.from_char(2195, 'UTF8')
or
local str = String.from_char('u2190') .. String.from_char('u2195')
The to_chars() is another story. In java, the char values are mainly used for comparison with literal values, like c == 'A' and this doesn't exist in Luan (as you explained, we should use str.sub(1,1) instead). I have never seen people actually checking the numeric value of a char, so I suggest we keep this method off until someone explains why we need it.