StringKit

A lightweight .NET library of extension methods for common string transformations and formatting.

NuGet NuGet Downloads CI License: MIT GitHub Stars

1. Quick Start

Install via NuGet:

dotnet add package StringKit
using StringKit;

2. Features

  • Case conversion & truncation: ToSlug, ToCamelCase, ToPascalCase, ToSnakeCase, ToTitleCase, ToSentenceCase, Truncate, Repeat, Reverse
  • Normalization: NormalizeSpaces, RemoveDiacritics, RemoveSpecialChars, NormalizeNewLines, StripHtml, CollapseWhitespace, JoinLines
  • Privacy / PII masking: Redact, MaskEmail, MaskPhone
  • Search & comparison: ContainsAny, ContainsAll, StartsWithAny, EndsWithAny, EqualsIgnoreCase
  • Validation: IsEmail, IsUrl, IsNumeric, IsAlpha, IsAlphanumeric, IsNullOrWhiteSpace, HasMinLength, HasMaxLength
  • Encoding / decoding: ToBase64, FromBase64, UrlEncode, UrlDecode, HtmlEncode, HtmlDecode

3. 📖 Read the documentation \(\rightarrow\)