Quicksilver.StringHelpers 1.1.0

dotnet add package Quicksilver.StringHelpers --version 1.1.0                
NuGet\Install-Package Quicksilver.StringHelpers -Version 1.1.0                
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="Quicksilver.StringHelpers" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Quicksilver.StringHelpers --version 1.1.0                
#r "nuget: Quicksilver.StringHelpers, 1.1.0"                
#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.
// Install Quicksilver.StringHelpers as a Cake Addin
#addin nuget:?package=Quicksilver.StringHelpers&version=1.1.0

// Install Quicksilver.StringHelpers as a Cake Tool
#tool nuget:?package=Quicksilver.StringHelpers&version=1.1.0                

Quicksilver String Helpers

This repository was created by Navid Sargheiny as a simple library utility to help with strings, especially Persian strings. It has many features, such as providing plural commas, fixing Arabic texts within Farsi texts, and converting numbers into Persian strings.

Installation

Use the package manager Nuget to install Quicksilver.StringHelpers

dotnet add package Quicksilver.StringHelpers

Usage

There are multiple capabilities available in this library, which I will explain below. Here are some examples of utilizing string helpers:

String Helpers

using Quicksilver.StringHelpers;

            var padString = 1.ToPadString(5, '0');  //   "00001"

            var str = "NavidSargheiny";
            var camelCase = str.ToCamelCase();  //   "navidSargheiny"

            str = "My        name    is         Navid          Sargheiny";
            var spaceTrim = str.SpaceTrim();    //  "My name is Navid Sargheiny"

            var texts = new List<string> { "سبب", "گلابی", "توت فرنگی", "هلو", "شلیل" };
            var pluralComma = StringHelpers.GetPluralComma(texts);  //  "سبب، گلابی، توت فرنگی، هلو و شلیل"

            var str = "لطفاً عدد 3322 و حروف ي و ك را اصلاح کن";
            var result = str.ToPersianText();     //    لطفاً عدد ۳۳۲۲ و حروف ی و ک را اصلاح کن

            var integer = 123456789;
            var result = integer.ToPersianText();   //  صد و بیست و سه میلیون و چهارصد و پنجاه و شش هزار و هفتصد و هشتاد و نه

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Quicksilver.StringHelpers:

Package Downloads
Quicksilver.PersianDate

This repository was created by Navid Sargheiny as a simple library to utilize Persian date capabilities. It has many features, such as providing different types of Persian dates and offering means to extract Persian dates as Persian text.

Quicksilver.EnumerableHelpers

This repository was created by Navid Sargheiny as a simple library to simplify enumerable conversions. It specializes in converting enumerables to dynamic and anonymous objects, and has the capability to convert IEnumerables to DataTable and more.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 145 6/27/2024
1.0.0 181 6/21/2024

IsNullOrEmpty method added