Part of dotnet.devfast project.
Developer Documentation, Release Notes
This project contains well-tested, self-explained & easy to use extension methods to achieve optimized runtime performance with improved readability of the code.
String parsing becomes as easy as stringValue.TryTo(out <T> ...) (where T can be bool, Guid, int, double, decimal, DateOnly, DateTime, TimeOnly etc...):
- "123".TryTo(out int parsedInt) should return true with parsedInt as 123.
Similar ".TryTo" also exists on ReadOnlySpan<char> and ReadOnlySpan<byte>
- possibleNullString?.Trim() ?? string.Empty Becomes possibleNullString.TrimSafeOrEmpty()
- possibleNullString?.Trim().ToUpper() ?? string.Empty Becomes possibleNullString.TrimSafeAndUpper() (same for Upper and more...)
- myByteArray.LiftNCopySafe(...) moves bytes with-in Arrays
- myByteArray.DoubleByteCapacity() returns new array with initial bytes but twice the capacity
- myByteArray.CopyToSafe(...) copies bytes to targeted array
- ForEach, ForEachAsync, ToBlockingEnumerable with Token
- Token support for SelectAsync, SkipAsync, TakeAsync, WhereAsync, CountAsync, ToChunksAsync etc.