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
libevent源码学习(13):事件主循环event_base_loop
libevent源码学习(11):超时管理之min_heap
libevent源码学习(10):min_heap数据结构解析
libevent源码学习(8):event_signal_map解析
libevent源码学习(9):事件event
libevent源码学习(6):事件处理基础——event_base的创建
libevent源码学习(5):TAILQ_QUEUE解析
仿Neo4j里的知识图谱,利用d3+vue开发的一个网络拓扑图
element表格内每一行删除提示el-popover的使用要点