NeoKolors.Extensions 2026.4.0-preview.2

This is a prerelease version of NeoKolors.Extensions.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package NeoKolors.Extensions --version 2026.4.0-preview.2
                    
NuGet\Install-Package NeoKolors.Extensions -Version 2026.4.0-preview.2
                    
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="NeoKolors.Extensions" Version="2026.4.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NeoKolors.Extensions" Version="2026.4.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="NeoKolors.Extensions" />
                    
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 NeoKolors.Extensions --version 2026.4.0-preview.2
                    
#r "nuget: NeoKolors.Extensions, 2026.4.0-preview.2"
                    
#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.
#:package NeoKolors.Extensions@2026.4.0-preview.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NeoKolors.Extensions&version=2026.4.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=NeoKolors.Extensions&version=2026.4.0-preview.2&prerelease
                    
Install as a Cake Tool

NeoKolors.Extensions

Build & Test NuGet Version NuGet Downloads License

NeoKolors.Extensions is a high-performance productivity library providing utility extensions for standard .NET and C# types. Optimized for performance and readability, it utilizes modern C# language features (such as C# 14 Extension Types) to clean up codebases.


Key Features

  • String Manipulation:
    • Word Wrapping & Chopping (String.cs): Chop strings into lines of maximum length without breaking words (Chop).
    • Text Visual Length: Calculate visible length of text by stripping ANSI escape sequences (GetPlainLength).
    • Casing Transformations: Methods for capitalizing sentences or decapitalizing initial characters (Capitalize, CapitalizeFirst).
  • Case Conversions (NamingCase):
    • Convert strings between standard programming cases via UniversalNamingConvertor:
      • CAMEL (e.g. helloWorld)
      • PASCAL (e.g. HelloWorld)
      • SNAKE (e.g. hello_world)
      • SCREAMING_SNAKE (e.g. HELLO_WORLD)
      • KEBAB (e.g. hello-world)
      • TRAIN (e.g. HELLO-WORLD)
  • Collection & Grid Enhancements:
    • Provides extension methods for collections and two-dimensional arrays (Enumerable.cs), simplifying spatial grid indexing and manipulations in the TUI screen space.
  • Console Input Helpers:
    • Adds extensions to ConsoleKeyInfo (ConsoleKeyInfo.cs) to ease mapping between keystrokes and custom TUI actions.

Core Usage

1. Word Wrapping (Chop)

Wrap text lines while respecting word boundaries:

using NeoKolors.Extensions;

string longParagraph = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr...";

// Chops the text to lines of maximum 20 characters
string[] lines = longParagraph.Chop(20);

2. Stripping ANSI Codes

Measure the printable character length of styled ANSI strings:

using NeoKolors.Extensions;

string coloredText = "\u001b[31mBoldRed\u001b[0m";
int visualLength = coloredText.GetPlainLength(); // Returns 7

3. Naming Conversions

Convert names dynamically across case schemes:

using NeoKolors.Extensions;

string snakeCase = "user_profile_photo";

// Convert to PascalCase (returns "UserProfilePhoto")
string pascal = snakeCase.ToCase(NamingCase.PASCAL);

// Convert to spinal/kebab-case (returns "user-profile-photo")
string kebab = snakeCase.ToCase(NamingCase.KEBAB);
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 was computed.  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.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on NeoKolors.Extensions:

Package Downloads
NeoKolors.Common

the common utilities for the NeoKolors library pack

NeoKolors.Console

basic console / logging utilites

NeoKolors.Tui

Package Description

NeoKolors.Tui.Core

Package Description

NeoKolors.Tui.Fonts

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.4.0-preview.4 145 11/15/2026
2026.4.0-preview.3 135 11/1/2026
2026.4.0-preview.2 119 10/30/2026
2026.4.0-preview.1 129 10/23/2026
2026.2.0-rc2 261 6/8/2026
2026.2.0-rc1 253 6/2/2026
2026.1.0-rc2 227 2/27/2026
2026.1.0-rc1 198 2/25/2026
0.25.44.1 246 10/28/2025