Skip to content

mx-pl/ExtendedTypes_CSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extended Types (Library)

Docs NuGet Version GitHub License

A small C#/.NET library providing extension methods for boolean and string data types.


Table Of Contents
  1. About This Project
  2. Features
  3. Feedback

About This Project

Motivation

The motivation for this library is two-fold:

Side-stepping the negation operator

Though the negation operator (!) is concise, it is also easy to miss and sometimes has to be put in places where it obstructs or does not align with the natural reading flow.

This library aims to provide extension methods which improve the readability and straightforwardness of such statements—and in some cases there conciseness, too.

More concise string manipulation

The C# string class comes pre-equipped with a variety of useful methods. However, invoking some of them requires rather roundabout statements (e.g. checking whether a string is empty).

This library provides some extension methods to simplify their usage.

License

Published under the MIT License. See the full license file for more information.

Package Releases

This library is published as a package on NuGet.

  • Current release: 1.2.0 (2024-02-06)

Information on what is new and on previous releases can be found in the CHANGELOG. An overview of all features currently included can be found [here][github-wiki-url].

Features

This library provides extension methods for:

  • Boolean
    • Straightforward toggling.
  • String
    • Concise null-or-empty checks.
    • Quick whitespace removal.
    • Easy shortening of sequences of identical chars.

Please see the Docs for a detailed feature overview.

Feedback

Please note: I am a hobby programmer, and the premise of this library or the way it is implemented might not make sense from a more professional point of view. Additionally, I cannot guarantee it is behaving as intended, and am not actively maintaining it.

That being said, I would appreciate your feedback. If you have any suggestions, corrections or ideas, you can leave a post in the Discussions or open an Issue.

About

A small C#/.NET library providing extension methods for boolean and string data types.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages