EddieBreeg.CoreExtensions
1.0.0-pre
See the version list below for details.
dotnet add package EddieBreeg.CoreExtensions --version 1.0.0-pre
NuGet\Install-Package EddieBreeg.CoreExtensions -Version 1.0.0-pre
<PackageReference Include="EddieBreeg.CoreExtensions" Version="1.0.0-pre" />
paket add EddieBreeg.CoreExtensions --version 1.0.0-pre
#r "nuget: EddieBreeg.CoreExtensions, 1.0.0-pre"
// Install EddieBreeg.CoreExtensions as a Cake Addin #addin nuget:?package=EddieBreeg.CoreExtensions&version=1.0.0-pre&prerelease // Install EddieBreeg.CoreExtensions as a Cake Tool #tool nuget:?package=EddieBreeg.CoreExtensions&version=1.0.0-pre&prerelease
CoreExtensions
CoreExtensions is a library which extends the core features of C#, using existing namespaces like System or System.Linq.
Version: 1.0.0 prerelease
Features List
- System.Core.SplitRange(System.Int32,System.Int32,System.Int32)
- System.Core.Range(System.Int32)
- System.Core.Range(System.Int32,System.Int32)
- System.Core.Range(System.Int32,System.Int32,System.Int32)
- System.InputHandler.KeyInput(System.String,System.Char)
- System.InputHandler.KeyInput(System.String,System.Char[],System.Char)
- System.InputHandler.LineInput(System.String,System.String)
- System.InputHandler.LineInput(System.String,System.String[],System.String)
- System.InputHandler.IntInput(System.String,System.Int32)
- System.InputHandler.DoubleInput(System.String,System.Double)
- System.InputHandler.ListInput(System.String,System.Collections.Generic.List{System.String},System.Func{System.Collections.Generic.List{System.String},System.Boolean})
- System.InputHandler.IntListInput(System.String,System.Collections.Generic.List{System.Int32},System.Func{System.Collections.Generic.List{System.Int32},System.Boolean})
Doc
Core
A class containing basic core features
SplitRange
SplitRange(int min, int max, int divider)
min: The inferiour boundry of the interval to split
max: The superior boundry of the interval to split
divider: The number of subintervals to compute
Creates an even subdivision of the interval [min;max]
Returns: An array containing the boundries of the subdivision
Range
Range(int limit)
- limit: The extreme value at which the sequence stops
Generates a sequence from 0 to limit (excluded)
Returns: The sequence into a List object
Range
Range(int start, int limit)
start: The integer from which the sequence starts
limit: The extreme value at which the sequence stops
Generates a sequence from start to limit (excluded)
Returns: The sequence into a List object
Range
Range(int start, int limit, int step)
start: The integer from which the sequence starts
limit: The extreme value at which the sequence stops
step: The increment
Generates a sequence from start to limit (excluded), incrementng by step
Returns: The sequence into a List object
NumericalStringComparer
An IComparer class to compare to numerical strings
Compare
Returns: a.CompareNumerically(b);
Remarks: See the doc of the CompareNumerically extension method for more details
ListExtensions
A collection of extension methods for List objects
SplitList
SplitList(List lst, int count)
Splits the list into count
sublists
- count:
Returns:
InputHandler
A static class which contains useful methods to handle user inputs
KeyInput
KeyInput(string str, char[] choices, char defaultValue)
Prompts the user to press a key
str: The string to print out
defaultValue: Defines what will be returned if the user presses Enter
Returns: A char object representing the key
KeyInput
KeyInput(string str, char[] choices, char defaultValue='\0')
- choices: The different options the user can choose from
LineInput
LineInput(string str, string defaultValue = "")
Prompts the user to enter a string of text
str: The string to print out
defaultValue: The value to return if the user hits enter
Returns: The string entered by the user
LineInput
LineInput(string str, string[] choices, string defaultValue)
Lets the user choose a string from a set of default values
- choices: An array containing the options the user can choose from
IntInput
IntInput(string str, int defaultValue = 0)
Prompts the user to enter an integer
str: The string to print out
defaultValue: What the function returns if the user hits Enter
Returns: The integer the user entered
DoubleInput
IntInput(string str, int defaultValue = 0)
Prompts the user to enter a double
str: The string to print out
defaultValue: What the function returns if the user hits Enter
Returns: The double the user entered
ListInput
ListInput(string str, List defaultValue = null, Func condition = null)
Prompts the user to enter a list of text strings
str: The string to print out
defaultValue: The list to return if the user hits Enter
condition: The condition the resulting list must satisfy
Returns: The user input as a List object
Remarks: The values entered by the user should be separated by a ' '
IntListInput
IntListInput(string str, List defaultValue = null, Func condition = null)
Prompts the user to enter a list of integers
str: The string to print out
defaultValue: The list to return if the user hits Enter
condition: The condition the resulting list must satisfy
Returns: The user input as a List object
Remarks: The values entered by the user should be separated by a ' '
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- 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.
Initial CoreExtensions prerelease. I didn't have time to run all the tests for now, and the doc isn't complete yet...