Skip to content

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.

License

Notifications You must be signed in to change notification settings

growlerdev/Abc123

Repository files navigation

Abc123

GitHub Release GitHub Release NuGet Downloads GitHub License GitHub Actions Workflow Status

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"

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages