inpsNuGet 1.1.11
dotnet add package inpsNuGet --version 1.1.11
NuGet\Install-Package inpsNuGet -Version 1.1.11
<PackageReference Include="inpsNuGet" Version="1.1.11" />
<PackageVersion Include="inpsNuGet" Version="1.1.11" />
<PackageReference Include="inpsNuGet" />
paket add inpsNuGet --version 1.1.11
#r "nuget: inpsNuGet, 1.1.11"
#:package inpsNuGet@1.1.11
#addin nuget:?package=inpsNuGet&version=1.1.11
#tool nuget:?package=inpsNuGet&version=1.1.11
inpsNuGet
inpsNuGet is a NuGet package for .NET that simplifies validation through a custom Check class, a custom Convert class for data conversion, and a dedicated class that simplifies file IO through SimpleFileHandler.
Features
The package operates under the inpsNuGet namespace and contains several distinct modules to help keep your codebase clean and readable:
Validation (Check)
A robust validation class to simplify standard string, format, and date checks.
- Email: Highly customizable email domain validation (allows whitelisting specific domain names, extensions, or full domains).
- Phone Numbers: Validates Philippine mobile numbers (
09,+639,639). - Strings: Check for spaces, symbols, pure numerical strings, or presence of numbers.
- Time/Dates: Easily calculate the remaining time between two
DateTimeobjects (Days, Hours, Minutes, Seconds).
Cryptography (Cipher)
A class to implement classic and recreational cipher techniques for string encryption.
- Transposition Cipher
- Giovanni Cipher
- Keyword Cipher
- Caesar Cipher
Data Conversion (Convert)
Effortless type casting, text manipulation, and data encoding.
- Base64, Hex, and Binary encoding/decoding.
- String reversal and Byte-array conversions (
UTF8). - Quick string parsing to
Int,Double,Long, andFloat.
File & Resource Handling (SimpleFileHandler)
Static methods to rapidly read, write, and extract files.
- Rapid
Read(),Write(), andAppend()for text files. - Embedded Resources: Use
ProjectToLocation()to easily extract and copy files marked as 'Embedded Resource' from your executing assembly to a physical directory.
Sorting Algorithms (SortAlgorithms)
A massive suite of sorting algorithms implemented in C# as quick plug-and-play functions for integer and double arrays.
- Standard: Quick Sort, Merge Sort, Heap Sort, Selection Sort, Insertion Sort, Bubble Sort.
- Advanced/Niche: Tim Sort, Intro Sort, Cocktail Shaker Sort, Shell Sort, Pigeonhole Sort, Bead Sort, Patience Sorting, and even Bogo Sort!
Installation
Install the package via the .NET CLI:
dotnet add package inpsNuGet
Or via the NuGet Package Manager Console:
Install-Package inpsNuGet
Quick Usage Examples
To use the package, simply include the namespace at the top of your file:
using inpsNuGet;
1. Validating Phone Numbers & Dates (Check)
// Validate Philippine Phone Numbers
bool isValidPhone = Check.IsAValidPhilippineMobileNumber("+639123456789");
Console.WriteLine(isValidPhone); // True
// Calculate time left
DateTime now = DateTime.Now;
DateTime future = now.AddDays(5).AddHours(2);
Console.WriteLine($"Days left: {Check.HowManyDaysLeft(now, future)}"); // ~5.083
2. Custom Email Validation (Check.Email)
// Setup strict domain rules
Check.Email.AddValidDomainName("gmail");
Check.Email.AddValidDomainExtension("com");
bool isEmailValid = Check.Email.IsValid("user@gmail.com");
Console.WriteLine(isEmailValid); // True
3. File Handling & Resource Extraction (SimpleFileHandler)
// Write, Append, and Read text
SimpleFileHandler.Write("log.txt", "Process started.\n");
SimpleFileHandler.Append("log.txt", "Process finished.\n");
Console.WriteLine(SimpleFileHandler.Read("log.txt"));
// Extract an Embedded Resource to a physical location
Assembly myAssembly = Assembly.GetExecutingAssembly();
SimpleFileHandler.ProjectToLocation(myAssembly, "MyConfig.json", @"C:\AppConfigs");
4. Text Encryption (Cipher)
string encrypted = Cipher.CaesarCipher("HELLO WORLD", shift: 3);
Console.WriteLine(encrypted); // KHOOR ZRUOG
5. String & Data Conversions (Convert)
// String Reversal
string reversed = Convert.Reverse("C# is awesome");
// Base64 Encoding
string encoded = Convert.ToBase64("Secret Message");
string decoded = Convert.FromBase64(encoded);
// Hex Conversions
string hexValue = Convert.ToHex("Hello");
Console.WriteLine(hexValue); // 48656C6C6F
6. Sorting Arrays (SortAlgorithms)
int[] array = { 5, 2, 9, 1, 5, 6 };
// Using QuickSort
int[] sortedArray = SortAlgorithms.QuickSort(array);
// Using more exotic sorts
int[] introSorted = SortAlgorithms.IntroSort(array);
Console.WriteLine(string.Join(", ", sortedArray)); // 1, 2, 5, 5, 6, 9
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
License
| 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. net8.0-windows7.0 is compatible. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.11 | 59 | 7/17/2026 |
| 1.1.10 | 59 | 7/16/2026 |
| 1.1.9 | 81 | 7/13/2026 |
| 1.1.8 | 90 | 7/13/2026 |
| 1.1.7 | 87 | 7/13/2026 |
| 1.1.6 | 91 | 7/13/2026 |
| 1.1.5 | 87 | 7/13/2026 |
| 1.1.4 | 93 | 7/13/2026 |
| 1.1.3 | 91 | 7/13/2026 |
| 1.1.2 | 88 | 7/13/2026 |
| 1.1.1 | 90 | 7/13/2026 |
| 1.1.0 | 85 | 7/13/2026 |
| 1.0.6 | 95 | 7/6/2026 |
| 1.0.5 | 99 | 6/19/2026 |
| 1.0.4 | 104 | 6/19/2026 |
| 1.0.3 | 104 | 6/8/2026 |
| 1.0.2 | 116 | 6/6/2026 |
| 1.0.1 | 101 | 6/5/2026 |
| 1.0.0 | 104 | 6/5/2026 |