
Will match both "salesperson" and "person". Adds a word to the vocabulary which cannot easily be pluralized/singularized by RegEx. Pluralize pluralizes the provided input while taking irregular and uncountable words into consideration:

There are also a few inflector methods: Pluralize You can provide your own collection formatter by implementing ICollectionFormatter and registering it with Configurator.CollectionFormatters. (If there is a custom formatter function, this applies only to the formatter's output.) Items are trimmed and blank (NullOrWhitespace) items are skipped. Humanize( FormatSomeClass) // "SomeObject #1 - One, SomeObject #2 - Two, and SomeObject #3 - Three" collection. Humanize( "or ") // "Specific String, Specific String, or Specific String" collection. Humanize() // "Specific String, Specific String, and Specific String" collection. The foundation of this was set in the BDDfy framework where class names, method names and properties are turned into human readable sentences. Humanize string extensions allow you turn an otherwise computerized string into a more readable human-friendly one. The detailed explanation for how this works is in the comments here. You can include multiple languages by installing however many language packages you want. Specific languages: Use the language specific packages you'd like.Only the English language resources will be available

English: use the Humanizer.Core package.This pulls in Humanizer.Core and all language packages. All languages: use the main Humanizer package.If you're not sure, then just use the main Humanizer package. By default, the main Humanizer 2.0 package installs all supported languagesĮxactly like it does in 1.x. You choose which packagesīased on what NuGet package(s) you install. New in Humanizer 2.0 is the option to choose which localization packages you wish to use.

NET Core).Īlso Humanizer symbols are source indexed with SourceLink and are included in the package so you can step through Humanizer code while debugging your code.įor pre-release builds, Azure Artifacts feed is available where you can pull down CI packages from the latest codebase. NET Standard 1.0+ (.Net 4.5+, UWP, Xamarin, and. NET Standard Class Library with support for. You can install Humanizer as a nuget package: Mix this into your framework to simplify your life.It is licensed under the MIT (an OSI approved license). NET Foundation, and operates under their code of conduct. NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities.
