ToolBX.SmartyStrings
3.0.0
dotnet add package ToolBX.SmartyStrings --version 3.0.0
NuGet\Install-Package ToolBX.SmartyStrings -Version 3.0.0
<PackageReference Include="ToolBX.SmartyStrings" Version="3.0.0" />
paket add ToolBX.SmartyStrings --version 3.0.0
#r "nuget: ToolBX.SmartyStrings, 3.0.0"
// Install ToolBX.SmartyStrings as a Cake Addin #addin nuget:?package=ToolBX.SmartyStrings&version=3.0.0 // Install ToolBX.SmartyStrings as a Cake Tool #tool nuget:?package=ToolBX.SmartyStrings&version=3.0.0
SmartyStrings
Extension methods to make strings just a little bit smarter.
RemoveAll
Removes all occurences of the specified string or character from a string.
//returns "Hello, guy What's up'"
var newString = "Hello, guy!!! What's up!!'".RemoveAll('!');
IsNumeric
True if the string is an integer or floating point number.
if ("123".IsNumeric())
{
//do something
}
TrimStart / TrimEnd
Removes all occurences of the specified string from the start or end of a string.
//returns "guy!!!"
var result = "Hello, guy!!!".TrimStart("Hello, ");
IndexesOf
Returns all indexes of the specified string in a string.
//returns [7, 34]
var indexes = "Hello, guy!!! Hello, Jessie lady-guy!!!".IndexesOf("guy");
LastIndex
Returns the last index of the string.
//returns 9
"Hello, guy!!!".LastIndex();
Potential breaking changes
1.0.X → 1.1.X : SmartyStrings no longer references EasyTypeParsing so you'll have to add it to your project if you needed it before
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. |
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ToolBX.SmartyStrings:
Package | Downloads |
---|---|
ToolBX.Reflection4Humans.Extensions
Reflection extension methods meant to be used by humans. |
|
ToolBX.AwesomeMarkup
Extracts any kind of markup information from a string of characters. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.0 | 4,371 | 9/24/2024 |
3.0.0-beta2 | 788 | 9/4/2024 |
3.0.0-beta1 | 98 | 9/2/2024 |
2.2.0 | 1,019 | 1/12/2024 |
2.0.1 | 515 | 4/25/2023 |
2.0.0 | 339 | 11/9/2022 |
1.0.1 | 418 | 7/16/2022 |
1.0.0 | 398 | 5/22/2022 |