TextBufferKit - vscode-textbuffer 代码到 Swift 5.1 的移植
(目前这需要 Xcode 11 才能构建)
文档在此
https://vscode.js.cn/blogs/2018/03/23/text-buffer-reimplementation
基于此处的代码
https://github.com/Microsoft/vscode-textbuffer
加上 VSCode 扩展,其中包括更高级别的 API 和文本匹配
https://github.com/Microsoft/vscode
与原始实现的一个显著的区别是,这个版本使用字节而不是字符进行存储,因此有必要从 UTF8 表示中创建字符串和字符。xs