SkillAgentSearch skills...

IvanStoychev.Useful.String.Extensions

A .Net library of useful extension methods for the "string" class in C#.

Install / Use

/learn @IvanStoychev/IvanStoychev.Useful.String.Extensions
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <br> <a href="https://www.nuget.org/packages/IvanStoychev.Useful.String.Extensions"><img src="Project logo.png" alt="IvanStoychev.Useful.String.Extensions"></a> </p> <p align="center"> <a href="https://github.com/IvanStoychev/IvanStoychev.Useful.String.Extensions/graphs/commit-activity"> <img src="https://img.shields.io/github/commit-activity/m/IvanStoychev/IvanStoychev.Useful.String.Extensions?style=plastic" alt="GitHub commit activity"> </a> <a href="https://github.com/IvanStoychev/IvanStoychev.Useful.String.Extensions/branches"> <img src="https://img.shields.io/github/last-commit/IvanStoychev/IvanStoychev.Useful.String.Extensions?style=plastic" alt="GitHub last commit"> </a> <a href="https://github.com/IvanStoychev/IvanStoychev.Useful.String.Extensions/graphs/commit-activity"> <img src="https://img.shields.io/github/commits-since/IvanStoychev/IvanStoychev.Useful.String.Extensions/latest?style=plastic" alt="GitHub commits since latest release (by date)"> </a> <br> <a href="https://www.nuget.org/packages/IvanStoychev.Useful.String.Extensions"> <img src="https://img.shields.io/nuget/v/IvanStoychev.Useful.String.Extensions?style=plastic" alt="Nuget latest version"> </a> <a href="https://github.com/IvanStoychev/IvanStoychev.Useful.String.Extensions/releases"> <img src="https://img.shields.io/github/v/release/IvanStoychev/IvanStoychev.Useful.String.Extensions?style=plastic" alt="GitHub latest release"> </a> <a href="https://github.com/IvanStoychev/IvanStoychev.Useful.String.Extensions/blob/master/LICENSE"> <img src="https://img.shields.io/github/license/IvanStoychev/IvanStoychev.Useful.String.Extensions?style=plastic" alt="Project license"> </a> </p> <p align="center">A collection of methods designed to make your life easier.</p> <p align="center">This repo uses <a href="https://semver.org/#semantic-versioning-200">Semantic Versioning 2.0.0</a></p> <br> <div align="center" id="user-content-toc">

| Table of Contents | | --------------------- | | <a href="#-join-the-community">💬 Community</a> | | <a href="#sparkling_heart-support-the-project">:sparkling_heart: Support</a> | | <a href="#-introduction">📣 Introduction</a> | | <a href="#-demo">🎬 Demo</a> | | <a href="#-features">🚀 Features</a> | | <a href="#-installation">🏗 Installation</a> | | <a href="#ℹ-how-to-use">ℹ How to use</a> | | <a href="#-examples">🎞 Examples</a> | | <a href="#-documentation">📖 Documentation</a> | | <a href="#-contribution">🧙‍ Contribution</a> |

</div> <br/>

💬 Join the community

<div align="center">

Follow @ivan_stoychev <br>GitQ <br>Join the chat at https://gitter.im/IvanStoychev-Useful-String-Extensions/community <br>Share your thoughts in https://github.com/IvanStoychev/IvanStoychev.Useful.String.Extensions/discussions

</div> <br/>

:sparkling_heart: Support the project

<div align="center">

Support me on Patreon <br>Buy me a ko-fi <br>Sponsor me with PayPal <br>Buy me a coffee

</div> <br/>

📣 Introduction

This is a collection of string extension methods that I have been in need of many a time, so I bundled them in a nuget package and published the code here. They are designed to be "ease-of-life" and "generally making your life easier" methods with user comfort in mind, which is why there are numerious overloads, designed for every case I could think of.

<br/>

🎬 Demo

<div align="center">

https://github.com/user-attachments/assets/bba2b379-1737-425d-a809-6c57973ea2b9

</div> <br/>

🚀 Features

  • [Substring][9] methods that use string arguments to determine a substring's position, instead of a starting index.
    • Ex. "This is the start bla bladdy blah.".Substring("start ", false) will return "bla bladdy blah.", while "This is the start bla bladdy blah and this is the end.".Substring("start ", "blah", StringInclusionOptions.IncludeNone) will return "bla bladdy ".
  • [Replace][8] methods that take a series of strings or characters and replace all their occurrences in the original string with a provided value.
    • Ex. "Cucumbers, oranges and apples are vegetables.".Replace("tomatoes", "oranges", "apples") will return "Cucumbers, tomatoes and tomatoes are vegetables.".
  • [Contains][7] methods that check if a string contains any of a series of provided values.
    • Ex. "brake wheel icon number stoic".Contains("keen", "wild", "icon") will return true.
  • [Remove][6] methods that take a series of strings or characters and clear all their occurrences from the string with a single method call.
    • Ex. "Lorem ipsum dolor Lorem ipsum sit amet".Remove("Lorem ", "ipsum ", "t") will return "dolor si ame".
  • [TrimStart][6] and [TrimEnd][6] methods that take a string and remove it from the start or end of the original string.
    • Ex. "In the beginning there was an end".TrimStart("In the beginning ") will return "there was an end", while "In the beginning there was an end".TrimEnd(" an end") will produce "In the beginning there was".
  • Methods to keep or remove all special characters, letters and digits from a string.
    • Ex. "!#%&lorem^@ipsum!@%".KeepOnlyLetters() will return "loremipsum".
  • And much more.
<br/>

🏗 Installation

Install using "NuGet Package Manager" in Visual Studio <br/>1. Open the solution to which you wish to add the library. <br/>2. Open the "NuGet Package Manager".

  • Option 1 (allows installation to multiple projects in the solution) <br/>In "Solution Explorer" right-click the solution and choose "Manage NuGet Packages for Solution...".
  • Option 2 (allows installation to multiple projects in the solution) <br/>Click the "Tools" menu bar item, navigate to "NuGet Package Manager" and select "Manage NuGet Packages for Solution...".
  • Option 3 (allows installation only to a single project) <br/>Right-click the project, to which you wish to add the library, and choose "Manage NuGet Packages...".

<br/>3. Make sure your "Package source:" (found in the upper-right corner) is pointing to a nuget source that has the library in its catalogue, for example "nuget.org". <br/>4. Make sure you're in the "Browse" section (located in the upper-left corner). <br/>5. Enter "IvanStoychev.Useful.String.Extensions" in the search box. <br/>6. Select the "IvanStoychev.Useful.String.Extensions" package and choose a version to intall. <br/>6.1. If you've opened the Package Manager using option 1 or 2 you can select which projects to install the library to. <br/>7. Click the "Install" button and read the licence terms. Choose whether you agree to them or not.

<br/>

Install manually <br/>1.a. Download the package from [NuGet][4], [Github packages][5] or the [Releases][2] page. <br/>-or- <br/>1.b. Clone the repo and build in it "Release" mode, which will produce a package file in the project's release dir - "~\IvanStoychev.Useful.String.Extensions\IvanStoychev.Useful.String.Extensions\bin\Release". <br/>2. Make sure you have the .NET CLI installed. <br/>3. Open a command line and Run the command dotnet add <PROJECT> package <PACKAGE>. <br/>where: <br/><PROJECT> is the path to the *.csproj file to which you want to add the package (if it is located in the command line's working directory you can omit this parameter). <br/><PACKAGE> is the path to the package you have downloaded. <br/> <br/>Install using "Package Manager Console" <br/>1. Run this command in the "Package Manager Console": Install-Package IvanStoychev.Useful.String.Extensions. <br/> <br/>Install using PackageReference <br/>1. Add this line, in an "<ItemGroup>", to your .csproj file <PackageReference Include="IvanStoychev.Useful.String.Extensions" Version="VersionNumber"/>. <br/>where: <br/>VersionNumber is the version of the package you wish to use, e.g. 1.0.0. <br/> <br/>__*Install usi

Related Skills

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated5mo ago
Forks4

Languages

C#

Security Score

87/100

Audited on Oct 16, 2025

No findings