public static int Asc(string character)
{
if (character.Length == 1)
{
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
int intAsciiCode = (int)asciiEncoding.GetBytes(character)[0];
return (intAsciiCode);
}
else
{
throw new Exception("Character is not valid.");
}
}
ASCII码转字符:
public static string Chr(int asciiCode)
{
if (asciiCode >= 0 && asciiCode <= 255)
{
System.Text.ASCIIEncoding asciiEncoding = new System.Text.ASCIIEncoding();
byte[] byteArray = new byte[] { (byte)asciiCode };
string strCharacter = asciiEncoding.GetString(byteArray);
return (strCharacter);
}
else
{
throw new Exception("ASCII Code is not valid.");
}
}
0
0
MyBatis中的JdbcType映射介绍
mybatis的一些特殊符号标识(大于,小于,等于,不等于)
c++多重继承
tensorflow 一些好的blog链接和tensorflow gpu版本安装
java中Arraylist复制方法
java/python中的队列
java中的函数参数
linux命令
python爬某个网站的图片