![]() |
VOOZH | about |
dotnet add package CaseON --version 1.4.0
NuGet\Install-Package CaseON -Version 1.4.0
<PackageReference Include="CaseON" Version="1.4.0" />
<PackageVersion Include="CaseON" Version="1.4.0" />Directory.Packages.props
<PackageReference Include="CaseON" />Project file
paket add CaseON --version 1.4.0
#r "nuget: CaseON, 1.4.0"
#:package CaseON@1.4.0
#addin nuget:?package=CaseON&version=1.4.0Install as a Cake Addin
#tool nuget:?package=CaseON&version=1.4.0Install as a Cake Tool
CaseON is a lightweight and efficient C# library designed to simplify string manipulation and validation. It provides robust utilities for converting strings to various casing styles, validating common data formats, and, with the addition of the MatchON namespace, enables advanced string similarity comparisons.
Convert strings into the following popular casing formats:
snake_casekebab-casePascalCasecamelCaseSentence caseTitle CaseExtensive helper methods to validate common string formats:
With the new MatchON namespace, CaseON adds several advanced string similarity algorithms:
ArgumentExceptions for null or empty/whitespace input strings.New MatchON Namespace:
MatchON that includes advanced string similarity matching algorithms to compare strings with greater accuracy. The following methods are now available:
String Validation Methods:
Installation: You can easily add CaseON to your project via NuGet. Alternatively, you can directly include the source code in your project.
Basic Example:
using CaseON;
// String Casing
string myString = "This Is A Test String";
string snakeCase = CaseON.ConvertON.ToSnakeCase(myString); // Output: this_is_a_test_string
string kebabCase = CaseON.ConvertON.ToKebabCase(myString); // Output: this-is-a-test-string
string pascalCase = CaseON.ConvertON.ToPascalCase(myString); // Output: ThisIsATestString
string camelCase = CaseON.ConvertON.ToCamelCase(myString); // Output: thisIsATestString
string sentenceCase = CaseON.ConvertON.ToSentenceCase(myString); // Output: This is a test string
string titleCase = CaseON.ConvertON.ToTitleCase(myString); // Output: This Is A Test String
Console.WriteLine($"Snake Case: {snakeCase}");
Console.WriteLine($"Kebab Case: {kebabCase}");
Console.WriteLine($"Pascal Case: {pascalCase}");
Console.WriteLine($"Camel Case: {camelCase}");
Console.WriteLine($"Sentence Case: {sentenceCase}");
Console.WriteLine($"Title Case: {titleCase}");
string email = "test@example.com";
string url = "https://www.example.com";
string ipAddress = "192.168.1.1";
string phoneNumber = "+1234567890";
string postalCode = "90210";
string date = "2024-11-26";
bool isValidEmail = CaseON.ValidateON.IsValidEmail(email); // Output: true
bool isValidUrl = CaseON.ValidateON.IsValidUrl(url); // Output: true
bool isValidIp = CaseON.ValidateON.IsValidIPv4(ipAddress); // Output: true
bool isValidPhone = CaseON.ValidateON.IsValidPhoneNumber(phoneNumber); // Output: true
bool isValidPostal = CaseON.ValidateON.IsValidPostalCode(postalCode); // Output: true
bool isValidDate = CaseON.ValidateON.IsValidDate(date); // Output: true
Console.WriteLine($"Valid Email: {isValidEmail}");
Console.WriteLine($"Valid URL: {isValidUrl}");
Console.WriteLine($"Valid IP Address: {isValidIp}");
Console.WriteLine($"Valid Phone Number: {isValidPhone}");
Console.WriteLine($"Valid Postal Code: {isValidPostal}");
Console.WriteLine($"Valid Date: {isValidDate}");
// String Similarity Matching with MatchON
string string1 = "hello world";
string string2 = "hello wrld";
double levenshteinSimilarity = MatchON.GetSimilarity(string1, string2); // Similarity based on Levenshtein Distance
double jaroWinklerSimilarity = MatchON.GetJaroWinklerSimilarity(string1, string2); // Similarity based on Jaro-Winkler
double lcsSimilarity = MatchON.GetLcsSimilarity(string1, string2); // Similarity based on Longest Common Subsequence
Console.WriteLine($"Levenshtein Similarity: {levenshteinSimilarity}"); // Output: Similarity score between 0 and 1
Console.WriteLine($"Jaro-Winkler Similarity: {jaroWinklerSimilarity}"); // Output: Similarity score between 0 and 1
Console.WriteLine($"LCS Similarity: {lcsSimilarity}"); // Output: Similarity score between 0 and 1
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net5.0-windows7.0 net5.0-windows7.0 is compatible. net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net6.0-windows7.0 net6.0-windows7.0 is compatible. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net7.0-windows7.0 net7.0-windows7.0 is compatible. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net8.0-windows7.0 net8.0-windows7.0 is compatible. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 is compatible. netcoreapp2.1 netcoreapp2.1 is compatible. netcoreapp2.2 netcoreapp2.2 is compatible. netcoreapp3.0 netcoreapp3.0 is compatible. netcoreapp3.1 netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net45 net45 is compatible. net451 net451 is compatible. net452 net452 is compatible. net46 net46 is compatible. net461 net461 is compatible. net462 net462 is compatible. net463 net463 was computed. net47 net47 is compatible. net471 net471 is compatible. net472 net472 is compatible. net48 net48 is compatible. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 1 NuGet packages that depend on CaseON:
| Package | Downloads |
|---|---|
|
Flowsy.Db.Unity
Provides functionality to access SQL databases with a configurable set of conventions and options for naming and formatting objects like tables, columns, routines and parameters. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.0 | 5,270,110 | 11/29/2024 |
| 1.3.1-beta | 208 | 11/27/2024 |
| 1.3.0 | 932 | 11/27/2024 |
| 1.2.0 | 931 | 11/26/2024 |
| 1.1.0 | 944 | 11/21/2024 |
Release Notes for ValidateON 1.4.0.0
ValidateON 1.4.0.0 introduces significant enhancements to the library, expanding its capabilities and improving developer experience. The highlight of this release is the introduction of broader support for target frameworks, ensuring seamless compatibility with a wide range of platforms and environments. This update makes it easier than ever for developers to integrate ValidateON into their projects regardless of the underlying framework.
In addition to the framework support, version 1.4.0.0 includes all the features and improvements from previous versions, including the powerful MatchON class introduced in version 1.3.0. This class provides robust pattern matching functionality for validating regular expressions and custom patterns, further enhancing the library’s versatility in handling complex data validation scenarios.
Version 1.4.0.0 also continues to support the validation of a broad spectrum of data formats, including email addresses, URLs, phone numbers, credit card numbers, GUIDs, MAC addresses, IBANs, JSON, XML, and Bitcoin wallet addresses. With these capabilities, developers can validate both simple and advanced data types with ease and efficiency.
We encourage users to try ValidateON 1.4.0.0, integrate it into their projects, and provide feedback to help shape future versions of the library.