T_Cyjb_Text_LineLocator - CYJB/Cyjb GitHub Wiki
提供可以用于定位行位置的功能,支持 \n(Unix) 和 \r\n(Windows) 作为换行符。
System.Object
Cyjb.Text.LineLocator
Namespace: Cyjb.Text
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public sealed class LineLocator
The LineLocator type exposes the following members.
名称 | 说明 | |
---|---|---|
![]() |
LineLocator() | 使用默认的 Tab 宽度(4)初始化 LineLocator 类的新实例。 |
![]() |
LineLocator(Int32) | 使用指定的 Tab 宽度初始化 LineLocator 类的新实例。 |
名称 | 说明 | |
---|---|---|
![]() |
TabSize | 获取 Tab 的宽度。 |
名称 | 说明 | |
---|---|---|
![]() |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
![]() |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
![]() |
GetPosition | 返回指定字符索引的行位置。 |
![]() |
GetType | Gets the Type of the current instance. (继承自 Object。) |
![]() |
Read | 读取指定的字符范围。 |
![]() |
ToString | Returns a string that represents the current object. (继承自 Object。) |
名称 | 说明 | |
---|---|---|
![]() ![]() |
TabSizeMark | 表示 Tab 的宽度标记。 |
名称 | 说明 | |
---|---|---|
![]() |
GetSpan | 返回指定文本范围的行位置范围。 (由 LineLocatorUtil 定义。) |
对行位置定位方法的详细解释,请参见我的 C# 词法分析器系列博文 《C# 词法分析器(二)输入缓冲和代码定位》。
《C# 词法分析器(二)输入缓冲和代码定位》