TextUtilities 1.0.0
dotnet add package TextUtilities --version 1.0.0
NuGet\Install-Package TextUtilities -Version 1.0.0
<PackageReference Include="TextUtilities" Version="1.0.0" />
<PackageVersion Include="TextUtilities" Version="1.0.0" />
<PackageReference Include="TextUtilities" />
paket add TextUtilities --version 1.0.0
#r "nuget: TextUtilities, 1.0.0"
#addin nuget:?package=TextUtilities&version=1.0.0
#tool nuget:?package=TextUtilities&version=1.0.0
TextUtilities
A simple yet useful .NET library for common text operations.
Created as a learning project and published as a reusable utility package.
✨ Features
TextUtilities currently includes the following string-related methods:
NormalizeSpaces(string input)
Removes extra spaces from a text and replaces them with single spaces.
Example:" This is a test "
→"This is a test"
ToTitleCase(string input)
Converts the first letter of each word to uppercase.
Example:"hello world"
→"Hello World"
IsNumeric(string input)
Checks whether a string contains only numeric characters.
Example:"123"
→true
|"abc123"
→false
🔸Using .NET CLI:
dotnet add package TextUtilities
⚙️ Installation
You can install the package via NuGet:
🔸 Using Package Manager:
Install-Package TextUtilities
using System;
using TextUtilities;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("=== NormalizeSpaces ===");
string messy = " This is a test ";
Console.WriteLine(TextHelper.NormalizeSpaces(messy)); // Output: This is a test
Console.WriteLine("\n=== ToTitleCase ===");
string text = "salam hamed";
Console.WriteLine(TextHelper.ToTitleCase(text)); // Output: Salam Hamed
Console.WriteLine("\n=== IsNumeric ===");
Console.WriteLine(TextHelper.IsNumeric("123")); // Output: True
Console.WriteLine(TextHelper.IsNumeric("hamed")); // Output: False
}
}
🛠 Target Framework
.NET 9
📦 NuGet Package
🔗 https://www.nuget.org/packages/TextUtilities/
📄 License
This project is licensed under the MIT License — free for personal and commercial use. See the LICENSE file for more details.
👤 Author
Created with ❤️ by Hamed Heydarian GitHub: https://github.com/hheydarian
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net9.0
- No dependencies.
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.0 | 135 | 4/7/2025 |