/csharpbase36

C# base 36 encoder & decoder

Primary LanguageC#The UnlicenseUnlicense

logo C# base 36 encoder

build nuget package

A C# library that decodes base 36 → base 10 and encodes base 10 → base 36.

Usage

// Encoding
Base36.Encode(10);    // returns "A"
Base36.Encode(10000); // returns "7PS"

// Decoding
Base36.Decode("Z");   // returns 35L
Base36.Decode("10");  // returns 36L
Base36.Decode("7PS"); // returns 10000L

More

  • Negative numbers are supported;
  • Case is ignored when decoding;
  • The long type is used both when encoding and decoding;
  • Unit tests written with MSTest;
  • There is a NuGet package.