StringExtensionPack 1.2.0
dotnet tool install --global StringExtensionPack --version 1.2.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local StringExtensionPack --version 1.2.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=StringExtensionPack&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package StringExtensionPack --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
StringExtensionPack
StringExtensionPack is a comprehensive C# library that provides over 40 useful extension methods for common string operations. Designed to make string manipulation cleaner, more expressive, and more efficient in .NET applications.
Developed with ❤️ by Herbert
✨ Features
🔠 String Conversion
- Convert to Title Case, Sentence Case, or Kebab Case
- Capitalize first character or all words
- Convert to/from Base64
- Generate SHA256 hash
- Remove diacritics (accents)
- Convert to safe filenames
🔍 String Analysis
- Check if string is numeric, email, URL, IPv4, or credit card
- Detect language (using LanguageDetection)
- Find most frequent character
- Check for palindromes
- Validate with Luhn algorithm (credit cards)
- Check if strings are anagrams
- Count words or occurrences
- Find all indexes of substrings
- Fuzzy matching with Levenshtein distance
✂️ String Manipulation
- Truncate with/without ellipsis
- Reverse strings
- Remove duplicates, digits, punctuation, HTML, or special chars
- Extract integers, hashtags, or domains
- Remove extra spaces
- Obfuscate/mask sensitive data
- Repeat strings
- Chunk strings into parts
- Get substrings between markers
🌐 Web Utilities
- URL encode/decode
- Extract domain from URL
- Strip HTML tags
- Validate URLs
🎲 Random Generation
- Generate random strings with customizable character sets
📦 Installation
Install via NuGet Package Manager:
dotnet add package StringExtensionPack
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 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.