📄 byteparser.cs
字号:
namespace Microsoft.VisualStudio.WebHost
{
using System;
internal sealed class ByteParser
{
private byte[] _bytes;
private int _pos;
internal ByteParser(byte[] bytes)
{
this._bytes = bytes;
this._pos = 0;
}
internal ByteString ReadLine()
{
ByteString str = null;
for (int i = this._pos; i < this._bytes.Length; i++)
{
if (this._bytes[i] == 10)
{
int length = i - this._pos;
if ((length > 0) && (this._bytes[i - 1] == 13))
{
length--;
}
str = new ByteString(this._bytes, this._pos, length);
this._pos = i + 1;
return str;
}
}
if (this._pos < this._bytes.Length)
{
str = new ByteString(this._bytes, this._pos, this._bytes.Length - this._pos);
}
this._pos = this._bytes.Length;
return str;
}
internal int CurrentOffset
{
get
{
return this._pos;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -