Hexa.NET.Utilities
2.2.12
Prefix Reserved
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
dotnet add package Hexa.NET.Utilities --version 2.2.12
NuGet\Install-Package Hexa.NET.Utilities -Version 2.2.12
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hexa.NET.Utilities" Version="2.2.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hexa.NET.Utilities" Version="2.2.12" />
<PackageReference Include="Hexa.NET.Utilities" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hexa.NET.Utilities --version 2.2.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Hexa.NET.Utilities, 2.2.12"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Hexa.NET.Utilities@2.2.12
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hexa.NET.Utilities&version=2.2.12
#tool nuget:?package=Hexa.NET.Utilities&version=2.2.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Hexa.NET.Utilities
This repository provides a collection of high-performance utilities designed to address common programming needs while maintaining low GC pressure and maximizing performance.
Features
UTF-8 String formatting
- Utf8Formatter
- A low level implementation for maximum performance.
- Number primitives incl. short ushort int uint long ulong float double and culture specifics
- Hexadecimal formatting
- Data size formatting eg. 1024 ⇒ 1 KiB.
- DateTimes full format string support and culture specifics
- TimeSpans full format string support and culture specifics
StrBuilder:- a lightweight string builder allowing use of stackalloc for temporary strings to prevent GC-Pressure.
IO Utilities
- Faster File System Enumeration with prefetching metadata
Data Structures
- Standard-like Strings:
StdWString(UTF-16)StdString(UTF-8)
- Standard-like Containers:
List(UnsafeList)Map(UnsafeDictionary)Set(UnsafeHashSet)Queue(UnsafeQueue)Stack(UnsafeStack)
Memory Management
- Custom Allocation Callbacks: Define your own memory allocation strategies.
- Pointer Wrapper Types: Utilize with generics for safer and more efficient pointer operations.
- Utility Functions:
- Memory allocation, freeing, copying, and moving
- String operations
- Memory setting (e.g.,
Memset) - Sorting (e.g.,
QSort)
Thread Safety
- Thread-Safe Pools:
- Object pools
- List pools
Getting Started
To get started with the HexaEngine Utilities library, follow these steps:
Install the NuGet package:
dotnet add package Hexa.NET.UtilitiesInclude the library in your project:
using Hexa.NET.Utilities;Initialize and utilize data structures:
var myString = new StdString("Hello, HexaEngine!"); var myList = new UnsafeList<int> { 1, 2 };Leverage memory management utilities:
int* memory = Utils.AllocT<int>(1); Utils.Free(memory);or
global using static Hexa.NET.Utilities.Utils; int* memory = AllocT<int>(1); Free(memory);Use thread-safe components for concurrent operations:
var pool = new ObjectPool<MyObject>(); var obj = pool.Rent(); pool.Return(obj);
Contributions
Contributions are welcome! If you have ideas for new features or improvements, feel free to submit a pull request or open an issue.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. 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 is compatible. 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 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. net9.0 is compatible. 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0