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.
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"
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"
- Updated to target .NET Standard 2.0