https://github.com/whatishedoing/whatishedoing.core
A library of extensions to core .NET functionality.
https://github.com/whatishedoing/whatishedoing.core
core dotnet extension-methods nuget-package
Last synced: 10 months ago
JSON representation
A library of extensions to core .NET functionality.
- Host: GitHub
- URL: https://github.com/whatishedoing/whatishedoing.core
- Owner: WhatIsHeDoing
- License: unlicense
- Created: 2017-12-07T21:39:14.000Z (over 8 years ago)
- Default Branch: live
- Last Pushed: 2023-02-21T20:57:34.000Z (over 3 years ago)
- Last Synced: 2025-08-01T04:28:55.444Z (11 months ago)
- Topics: core, dotnet, extension-methods, nuget-package
- Language: C#
- Homepage: https://www.nuget.org/packages/WhatIsHeDoing.Core/
- Size: 169 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# WhatIsHeDoing.Core
[](https://www.NuGet.org/packages/WhatIsHeDoing.Core/ 'NuGet package')
[](https://www.NuGet.org/packages/WhatIsHeDoing.Core/ 'NuGet downloads')
[][AppVeyor]
[](https://codecov.io/gh/WhatIsHeDoing/WhatIsHeDoing.Core 'Codecov code coverage')
[][Travis]
[][Codenvy]
A library of extensions to core .NET functionality.
## 👋 Introduction
The core .NET libraries - those that are available on most .NET runtime versions and environments -
are very feature-rich. However, there are times when you need a little helper function, and the list
of those functions slowly grows. Rather than having disparate collections of them, this project seeks
to group them under the `WhatIsHeDoing.Core` namespace, complete with unit tests in the `WhatIsHeDoing.Core.Tests`
project.
## 📡 Live Demo
Take a look at the editable code examples at [.NET Fiddle].
## 🦮 Usage
### Installing
This package is available via [NuGet].
### Methods
#### Extensions
##### DateTime
* `GetNextWeekday`: Gets the date at the next weekday supplied.
* `PeriodsBetween`: Generates the periods between two date times.
##### IEnumerable
* `Aggregate`: Aggregate with the index of the current element.
* `IterateJagged`: Flattens a collection of collections of unequal lengths after calling `ZipJagged`.
* `Randomise`: Returns a randomised order of the collection.
* `WhereNotNull`: Filters all null elements from a collection.
* `ZipJagged`: Enables a collection of unequal collection lengths to be iterated together, effectively as columns.
##### Integer
* `ToNearestCeiling`: Rounds to the largest comparison number.
##### Long
* `Length`: Determines the length of a positive number.
* `StripDigits`: Strips a specified number of digits from a number.
##### Object
* `AsFluent`: Calls any action fluently, such as void functions, so that calls can be chained to other
members of object.
##### String
* `AsCurrency`: Formats a string as a currency from the current globalisation.
* `IsTrue`: Determines whether this string can be converted to a boolean and that value is true.
* `Parse`: Invoke a Parse method from the TResult type on the value.
* `ToBytes`: Converts a string representation of a byte array - comma-separated values - to an actual byte array.
* `TryParse`: Tries to invoke a Parse method from the TResult type on the value.
##### Unsigned Long
* `Length`: Determines the length of a number.
* `StripDigits`: Strips a specified number of digits from a number.
## ⭐ Other Projects
Missing something? Have you tried these excellent projects?
* [Humanizr]: Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates,
times, timespans, numbers and quantities.
* [NodaTime]: A better date and time API for .NET.
## 🆘 Contributing
All contributions are greatly welcomed! Please see the [guidelines][contributing] for more information.
If you are developing locally, pull down this repo and build within Visual Studio (any edition), or
run `dotnet test` on any platform; the `live` branch is continuously built on both [Windows][AppVeyor]
and [Linux][Travis]. Alternatively, create a new Codenvy workspace from my [factory][Codenvy]!

## 👱 Authors
* **Darren Hickling**:
[.NET Fiddle]: https://dotnetfiddle.net/xXbTcX "C# Online Compiler | .NET Fiddle"
[AppVeyor]: https://ci.AppVeyor.com/project/DarrenHickling/whatishedoing-core-e1tc9
"WhatIsHeDoing.Core - AppVeyor [Windows build]"
[Codenvy]: https://Codenvy.io/f?id=factorynedmx40ex1ue8pdj "Start development on Codenvy"
[contributing]: CONTRIBUTING.md
[Humanizr]: http://humanizr.net/
[NodaTime]: https://nodatime.org/
[NuGet]: https://www.NuGet.org/packages/WhatIsHeDoing.Core/
[Travis]: https://Travis-ci.org/WhatIsHeDoing/WhatIsHeDoing.Core
"WhatIsHeDoing/WhatIsHeDoing.Core - Travis CI [Linux build]"