📄 sample44.cs
字号:
namespace apiBook
{
using System;
using System.Text;
public class TestDecoder
{
public static void Main()
{
byte[] bytes1 = { 0x10, 0x13, 0xd2 };
byte[] bytes2 = { 0x88, 0xa3 };
char[] testChar = new char[3];
Decoder testD = Encoding.UTF8.GetDecoder();
int count = testD.GetChars(bytes1, 0, bytes1.Length, testChar, 0);
// The value of charLen should be 2 now.
count=count+ testD.GetChars(bytes2, 0, bytes2.Length, testChar, count);
foreach(char c in testChar)
Console.WriteLine("U+" + ((ushort)c).ToString() + " ");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -