FixedLengthHelper 1.0.0

dotnet add package FixedLengthHelper --version 1.0.0                
NuGet\Install-Package FixedLengthHelper -Version 1.0.0                
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="FixedLengthHelper" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FixedLengthHelper --version 1.0.0                
#r "nuget: FixedLengthHelper, 1.0.0"                
#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 FixedLengthHelper as a Cake Addin
#addin nuget:?package=FixedLengthHelper&version=1.0.0

// Install FixedLengthHelper as a Cake Tool
#tool nuget:?package=FixedLengthHelper&version=1.0.0                

FixedLengthHelper

FixedLengthHelper is a library to work with fixed-length formats. Provides low-level operations that handle fixed-length formats.

FixedLengthHelper also supports multi-byte strings and surrogate pairs.

NuGet: FixedLengthHelper

Install-Package FixedLengthHelper

Introduction

Sample text:

00554Pedro Gomez          123423006022004
01732中村 充志        004350011052002
00112Ramiro Politti       000000001022000
00924Pablo Ramirez        033213024112002

Kanji characters are 3 bytes per character in UTF-8.

Sample code:

using System.Text;
using FixedLengthHelper;

var reader = new FixedLengthReader("Sample.txt", Encoding.UTF8);

while (await reader.ReadAsync())
{
    Console.WriteLine($"CustomerId: {reader.GetField(0, 5, TrimMode.TrimStart, '0')}");
    Console.WriteLine($"Name      : {reader.GetField(5, 21, TrimMode.TrimEnd)}");
    Console.WriteLine($"Balance   : {reader.GetField(26, 15, TrimMode.TrimStart, '0')}");
    Console.WriteLine();
}

The following results are obtained:

CustomerId: 554
Name      : Pedro Gomez
Balance   : 123423006022004

CustomerId: 1732
Name      : 中村 充志
Balance   : 4350011052002
...
Product Compatible and additional computed target framework versions.
.NET 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. 
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 39 12/18/2024