MicroElements.Text.Sources 1.0.0 The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved

.NET Standard 2.1
Install-Package MicroElements.Text.Sources -Version 1.0.0
dotnet add package MicroElements.Text.Sources --version 1.0.0
<PackageReference Include="MicroElements.Text.Sources" Version="1.0.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroElements.Text.Sources --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MicroElements.Text.Sources, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MicroElements.Text.Sources as a Cake Addin
#addin nuget:?package=MicroElements.Text.Sources&version=1.0.0

// Install MicroElements.Text.Sources as a Cake Tool
#tool nuget:?package=MicroElements.Text.Sources&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

MicroElements.Text.Sources

Summary

MicroElements source code only package. Provides extensions for working with text: formatting, hashing, encoding. Commonly Used Extensions: FormatValue, FormatAsTuple, EncodeBase58.

Extensions

FormatValue

Provides format function for most used types.

Rules:

  • formats numeric types with invariant culture
  • formats date types in ISO formats
  • recursively formats collections with FormatAsTuple as [value1, value2, ... valueN]
  • formats KeyValuePair<string, object> and ValueTuple<string, object> as (key: value)
  • for null returns provided placeholder

FormatAsTuple

Formats enumeration of values as tuple: (value1, value2, ...).

Base58

Base58 encoding provides fast encoding for small amount of data for example hashes.

Benefits over Base64 encoding:

  • Human readable because excludes similar characters 0OIl that looks the same in some fonts and could be used to create visually identical looking data.
  • Does not have line-breaks and special symbols so can be typed easy.
  • Double-clicking selects the whole string as one word if it's all alphanumeric.
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.1
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MicroElements.Text.Sources:

Package Downloads
MicroElements.Reflection.Sources The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

MicroElements source only package: Reflection. Classes: TypeExtensions, TypeCheck, ObjectExtensions, Expressions, CodeCompiler.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 131 1/9/2022

# Changelog

## [1.0.0] - 2022-01-09
- Added: StringFormatter moved from MicroElements.Formatting.Sources
- Added: Base58 extensions: EncodeBase58, Md5HashInBase58 (migrated from MicroElements.Metadata)
- Added: Hashing extensions: Md5HashBytes, AsHexText, Md5HashAsHexText

Full release notes can be found at: https://github.com/micro-elements/MicroElements.Shared/blob/master/src/MicroElements.Text.Sources/CHANGELOG.md