MarcusMedina.Fluent.Text
1.0.0
dotnet add package MarcusMedina.Fluent.Text --version 1.0.0
NuGet\Install-Package MarcusMedina.Fluent.Text -Version 1.0.0
<PackageReference Include="MarcusMedina.Fluent.Text" Version="1.0.0" />
<PackageVersion Include="MarcusMedina.Fluent.Text" Version="1.0.0" />
<PackageReference Include="MarcusMedina.Fluent.Text" />
paket add MarcusMedina.Fluent.Text --version 1.0.0
#r "nuget: MarcusMedina.Fluent.Text, 1.0.0"
#:package MarcusMedina.Fluent.Text@1.0.0
#addin nuget:?package=MarcusMedina.Fluent.Text&version=1.0.0
#tool nuget:?package=MarcusMedina.Fluent.Text&version=1.0.0
FluentBuilders.Text (C# / .NET 8.0)
Enterprise-grade fluent string extensions for C# with comprehensive testing and documentation.
๐ฏ Philosophy
Semantic Namespaces - Zero LINQ Pollution!
Each extension category has its own namespace. Import only what you need, keeping IntelliSense clean and focused.
Unlike LINQ which adds 200+ methods to every collection, FluentBuilders.Text lets you choose:
- Need casing? Import
MarcusMedina.Fluent.Text.Extensions.Casing - Need extraction? Import
MarcusMedina.Fluent.Text.Extensions.Extraction - Need everything? Import multiple namespaces
Result: Clean IntelliSense, intentional API surface, better developer experience.
๐ Installation
dotnet add package MarcusMedina.Fluent.Text
๐ Quick Start
// Import only what you need
using MarcusMedina.Fluent.Text.Extensions.Casing;
using MarcusMedina.Fluent.Text.Extensions.Extraction;
"hello world".ToPascalCase(); // "HelloWorld"
"hello world".Left(5); // "hello"
"Email: user@test.com".ExtractEmails(); // ["user@test.com"]
// C# built-ins (no extensions needed):
string.IsNullOrEmpty(value);
string.IsNullOrWhiteSpace(value);
๐ Quality Standards
This library follows enterprise-grade quality standards:
- โ 95%+ Test Coverage - Comprehensive unit tests with xUnit + FluentAssertions
- โ Zero Vulnerabilities - Continuous security scanning with Dependabot
- โ Multi-Platform CI/CD - Tested on Ubuntu, Windows, and macOS
- โ Complete XML Documentation - Every method documented with examples
- โ
Null-Safety First -
ArgumentNullException.ThrowIfNulleverywhere - โ
Culture-Aware -
CultureInfo.InvariantCulturefor predictable results - โ TDD-Developed - Red-Green-Refactor for every feature
- โ Performance Optimized - Benchmarked for production use
๐ Extension Categories
๐น Casing
Namespace: MarcusMedina.Fluent.Text.Extensions.Casing
"hello world".ToUpperCase() // "HELLO WORLD"
"HELLO WORLD".ToLowerCase() // "hello world"
"hello world".ToPascalCase() // "HelloWorld"
"HelloWorld".ToCamelCase() // "helloWorld"
"HelloWorld".ToKebabCase() // "hello-world"
"HelloWorld".ToSnakeCase() // "hello_world"
"hello world".ToScreamingSnakeCase() // "HELLO_WORLD"
"hello world".ToTitleCase() // "Hello World"
"hello world".ToProperCase() // "Hello World" (alias for TitleCase)
"hello world".ToSentenceCase() // "Hello world"
"john doe".ToNameCase() // "John Doe"
Methods: ToUpperCase, ToLowerCase, ToPascalCase, ToCamelCase, ToKebabCase, ToSnakeCase, ToScreamingSnakeCase, ToTitleCase, ToProperCase, ToSentenceCase, ToNameCase (11 core methods + additional variants like ToLeetSpeak, ToAlternatingCase, ToRandomCase)
๐น Line Endings
Namespace: MarcusMedina.Fluent.Text.Extensions.LineEndings
"text\r\nfile".ToUnixLineEndings() // "text\nfile"
"text\nfile".ToWindowsLineEndings() // "text\r\nfile"
Methods: ToUnixLineEndings, ToWindowsLineEndings, ToMacLineEndings, NormalizeLineEndings
๐น Pattern Matching
Namespace: MarcusMedina.Fluent.Text.Extensions.Pattern
"test".IsLike("te%") // true (SQL LIKE)
"hello".In(["hello", "world"]) // true
"bob".Between("alice", "charlie") // true
Methods: IsLike, ContainsText, StartsWithText, EndsWithText, In, Between
๐น Extraction
Namespace: MarcusMedina.Fluent.Text.Extensions.Extraction
// Basic extraction
"hello world".Left(5) // "hello"
"hello world".Right(5) // "world"
"hello world".Mid(6, 5) // "world"
// Data extraction
"Contact: user@test.com, admin@test.org".ExtractEmails()
// ["user@test.com", "admin@test.org"]
"Visit https://example.com".ExtractUrls()
// ["https://example.com"]
"Love #coding and #dotnet!".ExtractHashtags()
// ["#coding", "#dotnet"]
"Thanks @john and @jane!".ExtractMentions()
// ["@john", "@jane"]
Methods: Left, Right, Mid, ExtractEmails, ExtractUrls, ExtractPhoneNumbers, ExtractDates, ExtractNumbers, ExtractHashtags, ExtractMentions, ExtractBetween, ExtractWordsContaining, ExtractWordsStartingWith, ExtractWordsEndingWith, ExtractWordsOfLength, ExtractAllWords, ExtractAllSentences
๐น Counting
Namespace: MarcusMedina.Fluent.Text.Extensions.Counting
"Hello world, how are you?".CountWords() // 5
"Hello world".CountVowels() // 3
"Hello World".CountUppercase() // 2
"hello world".CountOccurrences('l') // 3
Methods: CountWords, CountSentences, CountVowels, CountConsonants, CountOccurrences (char & string), CountLines, CountDigits, CountLetters, CountUppercase, CountLowercase
๐น Manipulation
Namespace: MarcusMedina.Fluent.Text.Extensions.Manipulation
"hello".Reverse() // "olleh"
"hello world today".ShuffleWords() // "today hello world" (random)
"Ha".Repeat(3) // "HaHaHa"
"1234567890".Mask(4, 4) // "1234****90"
"This is a very long sentence".Truncate(10) // "This is..."
"This is a very long sentence".WrapTextAt(20, breakWords: true)
// Wraps text at 20 chars
Methods: Reverse, Shuffle, ShuffleWords, ShuffleSentences, Repeat, Truncate, Mask, RemoveWhitespace, CollapseWhitespace, InsertAt, WrapTextAt
๐น Data Formats & Encoding
Namespace: MarcusMedina.Fluent.Text.Extensions.DataFormat
// CSV operations
"hello, world".ToCsvField() // "\"hello, world\""
var data = new string[,] { { "Name" }, { "John" } };
data.ToCsv(); // "Name\nJohn"
// JSON operations
"{\"name\":\"John\"}".IsValidJson() // true
var list = new List<List<string>> { new() { "Name" }, new() { "John" } };
list.ToJsonArray(); // [["Name"],["John"]]
// Encoding operations
"hello world".ToBase64() // "aGVsbG8gd29ybGQ="
"hello world".ToUrlEncoded() // "hello+world"
"<script>".ToHtmlEncoded() // "<script>"
"hello".ToHex() // "68656C6C6F"
"<tag>".ToXmlContent() // "<tag>"
Methods:
- CSV: ToCsvField, FromCsvField, SplitCsvLine, ToCsvLine, ToCsv (3 overloads), FromCsvToArray, FromCsvToList
- JSON: ToJsonString, FromJsonString, IsValidJson, ToJsonArray (3 overloads), FromJsonToArray, FromJsonToList
- XML: ToXmlContent, FromXmlContent
- Base64: ToBase64, FromBase64, IsValidBase64
- URL: ToUrlEncoded, FromUrlEncoded
- HTML: ToHtmlEncoded, FromHtmlEncoded
- Hex: ToHex, FromHex, IsValidHex
โจ Why FluentBuilders.Text?
โ Zero Namespace Pollution - Semantic namespaces, import only what you need โ Enterprise Quality - 95%+ coverage, zero vulnerabilities, multi-platform CI/CD โ Complete Documentation - XML docs with examples for every method โ Null-Safe & Culture-Aware - Production-ready reliability โ Educational - Perfect for learning extension methods and TDD โ Modern .NET 8.0 - File-scoped namespaces, nullable reference types
๐งช Development
Build & Test
cd csharp
# Restore dependencies
dotnet restore
# Build with zero warnings
dotnet build /p:TreatWarningsAsErrors=true
# Run tests with coverage
dotnet test /p:CollectCoverage=true /p:Threshold=95
# Format code
dotnet format
Quality Checks
# Security scan
dotnet list package --vulnerable --include-transitive
# Verify code style
dotnet format --verify-no-changes
CI/CD
This project uses enterprise-grade GitHub Actions workflows:
- Continuous Integration - Quality gates, security scanning, multi-platform testing
- Automated Releases - Version tagging triggers NuGet publishing
- Dependabot - Automated dependency updates with security focus
See .github/workflows/ for details.
๐ค Contributing
See ../CONTRIBUTING.md for guidelines.
๐ License
MIT ยฉ Marcus Ackre Medina - See ../LICENSE
๐ง Status
Experimental - API may change before stable release
| 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. |
-
net8.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 | 184 | 10/8/2025 |