Sunlighter.FrayedKnot
1.0.1
dotnet add package Sunlighter.FrayedKnot --version 1.0.1
NuGet\Install-Package Sunlighter.FrayedKnot -Version 1.0.1
<PackageReference Include="Sunlighter.FrayedKnot" Version="1.0.1" />
<PackageVersion Include="Sunlighter.FrayedKnot" Version="1.0.1" />
<PackageReference Include="Sunlighter.FrayedKnot" />
paket add Sunlighter.FrayedKnot --version 1.0.1
#r "nuget: Sunlighter.FrayedKnot, 1.0.1"
#addin nuget:?package=Sunlighter.FrayedKnot&version=1.0.1
#tool nuget:?package=Sunlighter.FrayedKnot&version=1.0.1
FrayedKnot
An implementation of a Rope data structure for large string manipulation.
This library is available on NuGet.org as Sunlighter.FrayedKnot.
Purpose and Features
This library presents a class called Rope
. It's designed for quick manipulation of relatively large volumes of text,
especially when such manipulation consists of splitting and concatenation, which it can do in logarithmic time. It
uses char
as its character type.
Ropes are immutable and based internally on balanced trees. The leaves of the tree contain short strings, rather than individual characters.
This particular implementation is also indexed on newlines. The implementation considers "\r"
or "\n"
or "\r\n"
as a newline. Every node in the tree knows how many newline characters are under it, making it possible to quickly
find a line by its line number.
Ropes are equatable and comparable (internally using System.StringComparison.Ordinal
). This is provided by an
implementation of ITypeTraits<Rope>
which works with the Sunlighter.TypeTraitsLib
library. The type traits also
provide binary serialization, consistent with the traits for other types.
There are utility functions in a static RopeUtility
class to read a Rope
from a System.IO.TextReader
or a file,
or to write a rope to a System.IO.TextWriter
or a file.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Sunlighter.OptionLib (>= 1.0.2)
- Sunlighter.TypeTraitsLib (>= 1.0.1)
-
net9.0
- Sunlighter.OptionLib (>= 1.0.2)
- Sunlighter.TypeTraitsLib (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.