AugusteVN._Shared.Extensions 1.1.1

dotnet add package AugusteVN._Shared.Extensions --version 1.1.1
                    
NuGet\Install-Package AugusteVN._Shared.Extensions -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AugusteVN._Shared.Extensions" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AugusteVN._Shared.Extensions" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="AugusteVN._Shared.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AugusteVN._Shared.Extensions --version 1.1.1
                    
#r "nuget: AugusteVN._Shared.Extensions, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AugusteVN._Shared.Extensions@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AugusteVN._Shared.Extensions&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=AugusteVN._Shared.Extensions&version=1.1.1
                    
Install as a Cake Tool

AugusteVN._Shared.Extensions

A collection of reusable string and data type extension methods for .NET.

Installation

dotnet add package AugusteVN._Shared.Extensions

API Reference

AddQueryString(this string url, object queryData)

Appends query string parameters to a URL.

"https://example.com".AddQueryString(new { foo = "bar", baz = "qux" })
// → "https://example.com?foo=bar&baz=qux"

AddTrailingSlash(this string url) / RemoveTrailingSlash(this string url)

Ensures a URL has or lacks a trailing slash.

"https://example.com".AddTrailingSlash()
// → "https://example.com/"
"https://example.com/".RemoveTrailingSlash()
// → "https://example.com"

ToJson(this object data)

Serializes an object to JSON.

new { Name = "test", Value = 42 }.ToJson()
// → "{\"Name\":\"test\",\"Value\":42}"

ToBase64String(this string plainText) / FromBase64String(this string encodedText)

Encodes or decodes a string using Base64.

"Hello World".ToBase64String()
// → "SGVsbG8gV29ybGQ="
"SGVsbG8gV29ybGQ=".FromBase64String()
// → "Hello World"

IsValidEmail(this string emailAddress)

Validates an email address format using System.Net.Mail.MailAddress.

"user@example.com".IsValidEmail()  // → true
"not-an-email".IsValidEmail()      // → false

CaptureUrlsInString(this string text)

Extracts all URLs from a string using regex.

"Visit https://example.com/path".CaptureUrlsInString()
// → MatchCollection with 1 match: "https://example.com/path"

StripHtmlTags(this string text)

Removes all HTML tags from a string.

"<p>Hello <b>World</b></p>".StripHtmlTags()
// → "Hello World"

StripTrackingFromSlug(this string slug)

Removes query string tracking parameters from a URL slug.

"my-slug?utm_source=facebook".StripTrackingFromSlug()
// → "my-slug"

ReplaceUrlsWithHtmlLinkTags(this string text)

Wraps all URLs in an anchor tag.

"Check https://example.com".ReplaceUrlsWithHtmlLinkTags()
// → "Check <a href=\"https://example.com\" target=\"_blank\">https://example.com</a>"

TruncateText(this string text, int maxLength = 155)

Truncates text to a maximum length, appending ....

"Hello World This Is Long".TruncateText(10)
// → "Hello W..."

SanitizeUrl(this string url)

Strips protocol (http://, https://, httpss://) and www. prefix from a URL.

"https://www.example.com/path".SanitizeUrl()
// → "example.com/path"

SortAndDeduplicate(this IEnumerable<string> list)

Sorts a collection of strings and removes duplicates (filters null/empty).

new[] { "z", "a", "b", "a" }.SortAndDeduplicate()
// → SortedSet { "a", "b", "z" }

ConstructSlug(this string text, bool includeRandomSequence = true)

Converts text to a URL-friendly slug with optional random suffix.

"Hello World".ConstructSlug(false)
// → "hello-world"
"Hello World".ConstructSlug(true)
// → "hello-world-a3f1"

Disclaimer

This package is not yet battle-tested and is subject to breaking changes. It is intended for use in the author's own projects.

License: MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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 was computed.  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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on AugusteVN._Shared.Extensions:

Package Downloads
AugusteVN.Mollie.Api

Wrapper around the Mollie API to process payments and refunds.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.1 71 7/9/2026
1.1.0 80 7/9/2026
1.0.7 136 4/15/2026
1.0.6 156 1/21/2026
1.0.5 145 1/21/2026
1.0.4 1,648 3/18/2024
1.0.3 2,109 11/6/2023
1.0.2 232 11/6/2023
1.0.1 211 11/6/2023
1.0.0 277 10/27/2023

Upgraded to .NET 10.