I need the function that return the Ascii code (actually Unicode number code), 开发者_Python百科as well as convert that code to the Unicode character one. They are ChrW and AscW in .NET. Ex: AscW("A") is 65, ChrW(65) is A.
Thanks.
Actually, those are from VB.NET, not actually the .NET Framework.
In Java a char
is sort of a integral type. You can convert it to int
and back:
String s = "abc";
char a = s.charAt(0);
int a_codepoint = (int)a;
char x = (char)120;
精彩评论