NeoKolors.Extensions
2026.4.0-preview.2
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
<PackageReference Include="NeoKolors.Extensions" Version="2026.4.0-preview.2" />
<PackageVersion Include="NeoKolors.Extensions" Version="2026.4.0-preview.2" />
<PackageReference Include="NeoKolors.Extensions" />
paket add NeoKolors.Extensions --version 2026.4.0-preview.2
#r "nuget: NeoKolors.Extensions, 2026.4.0-preview.2"
#:package NeoKolors.Extensions@2026.4.0-preview.2
#addin nuget:?package=NeoKolors.Extensions&version=2026.4.0-preview.2&prerelease
#tool nuget:?package=NeoKolors.Extensions&version=2026.4.0-preview.2&prerelease
NeoKolors.Extensions
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).
- Word Wrapping & Chopping (String.cs): Chop strings into lines of maximum length without breaking words (
- 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)
- Convert strings between standard programming cases via UniversalNamingConvertor:
- 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.
- Adds extensions to
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 | Versions 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. |
-
.NETStandard 2.1
- Implyzer (>= 2026.5.4)
- JetBrains.Annotations (>= 2026.2.0)
- Metriks (>= 2026.4.0)
- System.Collections.Immutable (>= 10.0.12)
-
net10.0
- Implyzer (>= 2026.5.4)
- JetBrains.Annotations (>= 2026.2.0)
- Metriks (>= 2026.4.0)
-
net5.0
- Implyzer (>= 2026.5.4)
- JetBrains.Annotations (>= 2026.2.0)
- Metriks (>= 2026.4.0)
- System.Collections.Immutable (>= 10.0.12)
-
net8.0
- Implyzer (>= 2026.5.4)
- JetBrains.Annotations (>= 2026.2.0)
- Metriks (>= 2026.4.0)
- System.Collections.Immutable (>= 10.0.12)
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 |