ezC 0.3.0
dotnet add package ezC --version 0.3.0
NuGet\Install-Package ezC -Version 0.3.0
<PackageReference Include="ezC" Version="0.3.0" />
<PackageVersion Include="ezC" Version="0.3.0" />
<PackageReference Include="ezC" />
paket add ezC --version 0.3.0
#r "nuget: ezC, 0.3.0"
#:package ezC@0.3.0
#addin nuget:?package=ezC&version=0.3.0
#tool nuget:?package=ezC&version=0.3.0
ezCLib Documentation
Introduction
ezCLib is a powerful DLL library that provides various functions to simplify common tasks for beginner programmers. This document outlines most of the available functions and a description of what they do, consult full documentation or examples for in practice examples & uses
- Created By Nath Thornton
Table of Contents
Installation
To use the ezCLib DLL in your project, follow these steps:
- Download the latest version of the DLL from above using your preferred method
- Add the DLL reference to your project.
- Include
ezCnamespace in your code file. (by "using ezC;")
Function List
Console Related Functions:
cMsg: Writes a message to the console with a new line.cPause: Pauses the console and waits for user input before continuing.cBColor: Sets the background color of the console.cFColor: Sets the foreground color of the console.cTitle: Sets the console title.cClear: Clears the console screen.cResetStyle: Resets the console color and title to default.cClose: Closes the application.cWait: Pauses the execution for a specified number of milliseconds.cReqInput: Displays a prompt and reads input from the user.cReadKey: Reads a single key press from the console.
Fun Math Stuff:
random: Generates a random integer between two given values.findMax: Finds the maximum value among a set of integers.findMin: Finds the minimum value among a set of integers.isEven: Checks if an integer is even.isOdd: Checks if an integer is odd.cListNum: Writes a sequence of numbers to the console.
Whole Number Calculations:
numAdd: Adds two integers.numSub: Subtracts one integer from another.numDiv: Divides one integer by another and returns a float.numMult: Multiplies two integers.
Functions for Number Lists or Arrays:
numListAdd: Calculates the sum of a list of integers.numListMultiply: Calculates the product of a list of integers.DecimalListAdd: Calculates the sum of a list of floating-point numbers.
Fractionalized or Decimalized Numbers:
decimalAdd: Adds two floating-point numbers.decimalSub: Subtracts one floating-point number from another.decimalMultiply: Multiplies two floating-point numbers.dblMultiply: Multiplies two double-precision floating-point numbers.numSqrt: Calculates the square root of a number.numPower: Raises a base number to a given exponent.divRem: Calculates the remainder of a division operation.
More Advanced Functions:
getTimeNow: Returns the current date and time.dateToText: Converts a DateTime object to a string representation.tryCatch: Wraps a code block with a try-catch for error handling.serialize: Serializes an object to JSON.deserialize: Deserializes JSON back into an object.
String Manipulation:
substring: Extracts a substring from a given string based on the specified start and end positions.mergeText: Concatenates multiple strings together.remWhiteSpace: Removes whitespace from a string.getTextLength: Returns the length of a given string.textToUpper: Converts a string to uppercase.textToLower: Converts a string to lowercase.textReverse: Reverses the characters of a string.countOccurrences: Counts occurrences of a substring in a string.stringFormat: Formats a string using placeholders and arguments.
Array Manipulation:
arrayLength: Returns the length of an array.arrayCopy: Creates a copy of an array.arraySort: Sorts the elements of an array in ascending or descending order.arraySum: Calculates the sum of an integer array.arrayAverage: Calculates the average of an integer array.
Basic Mathematical Functions:
numMod: Performs modulo operation on two integers and returns the remainder.numRound: Rounds a decimal number to the nearest integer.numCeiling: Rounds a decimal number up to the nearest integer.numFloor: Rounds a decimal number down to the nearest integer.numTruncate: Truncates the decimal portion of a decimal number.calcDaysDifference: calculates the amount of days remaining from present to the target date
File Operations:
readFile: Reads the content of a file and returns it as a string.writeFile: Writes content to a file.newFolder: Creates a new directory in the given path.copyFile: Copies the given file to the target pathdoesFileExist: Checks if a file exists at the specified path.
Network/Web Related Functions:
isValidLink: Checks if a given URL is a valid HTTP or HTTPS link.openWeb: Opens a given URL in the default web browser.GetHttpReq: Performs a GET request to a given URL and returns the response as a string.SendHttpReq: Performs a POST request to a given URL with a payload and returns the response as a string.ResolveDNS: Resolves the IP address of a given domain name.SetNetConnection: Sets a network connection string with a server and port and constructs it for use in codeSetMySQLString: Sets a MySQL connection string with server, port, database, username, and password and builds it for use in code.
Window Functions:
Basic Functions
CreateWindow: Creates a new window with the specified title, width, and height.Open: Opens the window.Close: Closes the window.Enable: Enables the window.Disable: Disables the window.AddButton: Adds a button to the window with the specified text and click action.AddTextBox: Adds a text box to the window with the specified initial text.AddDropDown: Adds a drop-down list to the window with the specified options and selection change action.SetDefaultTextColor: Sets the default text color for the window.SetDefaultTextSize: Sets the default text size for the window.SetDefaultFont: Sets the default font for the window.
Button Functions:
Click: Simulates a click on the button.
Window Text/UI Functions:
Display: Displays the text box on the window.
DropDown Functions:
Display: Displays the drop-down list on the window.SelectOption: Selects an option from the drop-down list.
Fun Stuff:
ShuffleArray: Shuffles the elements of an array in random order.IsPalindrome: Checks if a given string is a palindrome (reads the same backward as forward).PrintAsciiArt: Displays ASCII art provided as a string.IsPrimeNum: Checks if a given integer is a prime number.GenerateFibonacciSequence: Generates a Fibonacci sequence of a specified length.CalculateFactorial: Calculates the factorial of an integer.
Cryptography
cShowEncryptTextandcShowDecryptText: Functions to encrypt and decrypt text and print or display the results.encryptTextanddecryptText: Functions to encrypt and decrypt text and return the results as a string.encryptFileanddecryptFile: encrypts/ Decrypts an encrypted file using AES encryption. It takes the input file path, output file path, and password as parameters.cShowDecryptText: Decrypts an encrypted text and displays the decrypted text on the console. It takes the encrypted text and password as parameters.decryptText: Decrypts an encrypted text and returns the decrypted text as a string. It takes the encrypted text and password as parameters.
And much, Much more! -- Will add to this list as and when! I will also be posting full docs on usage at around version 1
| Product | Versions 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 was computed. 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 was computed. 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. 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. |
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
- System.Data.SqlClient (>= 4.8.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.