HeroKit
Everyday extension methods for .NET, with first-class support for Turkish data: TCKN, VKN, IBAN, phone numbers and amounts in words. One country and language model with Türkiye and the United States built in; add your own country without new methods.
dotnet add package HeroKit
See it in action
using HeroKit.Banking;
using HeroKit.Globalization;
using HeroKit.Globalization.Turkey;
"10000000146".IsValidTckn(); // true
"TR330006100519786457841326".FormatIban(); // "TR33 0006 1005 1978 6457 8413 26"
"0532 123 45 67".ToE164(Countries.Turkey); // "+905321234567"
123.50m.ToCurrencyWords(Currencies.TurkishLira); // "yüz yirmi üç Türk lirası elli kuruş"
"istanbul ılıca".ToTitleCase(Languages.Turkish); // "İstanbul Ilıca"
"34abc123".FormatVehiclePlate(Countries.Turkey); // "34 ABC 123"
What's inside
Countries and languages
A Country, Language and Currency model with Türkiye built in: TCKN and VKN, IBAN, phone numbers, regions, plates, postal codes, lira, amounts in words, holidays and business days, e-invoice numbers, İ/ı-aware casing and sorting without ICU. Add your own country.
Form validation
[Tckn], [Iban], [PhoneNumber("TR")], [VehiclePlate("TR")] and more for ASP.NET Core and Blazor models. One line per field.
Strings
Slugs, title case for any culture, truncate without breaking emoji, masking, null-safe checks.
Conversions
To<T> for any IParsable type, lenient ToX and checked TryToX. Culture-invariant; bad input never throws.
Collections and dates
WhereIf and paging that Entity Framework translates to SQL. Week, month and year ranges, age, weekends.
Prices, VAT and cards
Round to a step, psychological prices, VAT in and out. Card validation with Troy support.
File types and uploads
Separate package: detect about 70 types from content, map extensions and MIME types, and reject unsafe uploads: programs, double extensions, SVG with script. Add your own types.
Built to be depended on
Stable public API
Tracked with analyzers. Nothing is removed without an [Obsolete] release first.
Tested
Table-driven tests for every helper, run on .NET 8 and .NET 10 with a live coverage badge.
Fast
Hot paths measured with BenchmarkDotNet. Source-generated regex and single-pass string helpers.
Questions or ideas? Join GitHub Discussions. Like HeroKit? Give it a star ⭐