Sunlighter.FrayedKnot 1.0.1

dotnet add package Sunlighter.FrayedKnot --version 1.0.1
                    
NuGet\Install-Package Sunlighter.FrayedKnot -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sunlighter.FrayedKnot" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sunlighter.FrayedKnot" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Sunlighter.FrayedKnot" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Sunlighter.FrayedKnot --version 1.0.1
                    
#r "nuget: Sunlighter.FrayedKnot, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Sunlighter.FrayedKnot&version=1.0.1
                    
Install Sunlighter.FrayedKnot as a Cake Addin
#tool nuget:?package=Sunlighter.FrayedKnot&version=1.0.1
                    
Install Sunlighter.FrayedKnot as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 158 4/20/2025
1.0.0 173 4/18/2025