Watsug.JcShellFormat
1.0.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Watsug.JcShellFormat --version 1.0.5
NuGet\Install-Package Watsug.JcShellFormat -Version 1.0.5
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="Watsug.JcShellFormat" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Watsug.JcShellFormat --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Watsug.JcShellFormat, 1.0.5"
#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.
// Install Watsug.JcShellFormat as a Cake Addin
#addin nuget:?package=Watsug.JcShellFormat&version=1.0.5
// Install Watsug.JcShellFormat as a Cake Tool
#tool nuget:?package=Watsug.JcShellFormat&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
This is a JCShell like formatting library.
Documentation
This library supports following features
Variables
Variables are resolved Based on the provided dictionary, eg.:
Dictionary<string, string> dict = new Dictionary<string, string>()
{
{"x1", "Hello"},
{"x2", "World"}
};
var format = new JcShellFormat("${x1} ${x2}!", dict);
string tmp = format.Evaluate(); // "Hello World!"
Length encoding for binary data
var format = new JcShellFormat("#(DEADBEEF)");
string tmp = format.Evaluate(); // "04DEADBEEF"
BER length encoding for binary data
string data = new string('1', 256);
var format = new JcShellFormat($"%({data})");
string tmp = format.Evaluate(); // 81801111..11
ASCII to hex conversion
var format = new JcShellFormat("%(|DEADBEEF)");
string tmp = format.Evaluate(); // "09444541444245454629"
Integer to hex
Dictionary<string, string> dict = new Dictionary<string, string>()
{
{"xyz", "15"}
};
var format = new JcShellFormat("${xyz;h4}", dict);
string tmp = format.Evaluate(); // "000F"
Releases
2019.11.26 v0.0.4
- Initial release
License information
Available in licence.txt
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release