/Abc123

Infinitely correlates an array of characters to a zero based index. When the index exceeds the length of the character array, a prefix is recursively added.

Primary LanguageC#MIT LicenseMIT

Abc123

NuGet version (iAutomateDesign.AutodeskAppStore)

Infinitely correlates an array of characters to a zero based index. When the index exceeds the length of the character array, a prefix is recursively added.

Usage

The default character array is the English Alphabet.

var alphaSvc = new AlphaNumericService();

alphaSvc.GetString(0); //--> returns "A"
alphaSvc.GetString(1); //--> returns "B"
alphaSvc.GetString(2); //--> returns "C"

alphaSvc.GetString(26); //--> returns "AA"
alphaSvc.GetString(777); //--> returns "ACX"

Overriding Default Character Array

The character array can be overridden by passing in a string into the AlphaNumericService constructor.

var alphaSvc = new AlphaNumericService("SOMETEXT");

alphaSvc.GetString(0); //--> returns "S"
alphaSvc.GetString(1); //--> returns "O"
alphaSvc.GetString(2); //--> returns "M"

alphaSvc.GetString(8); //--> returns "SS"

Change Log

1.3.1

  • Updated to target .NET Standard 2.0