I want to convert an integer into its character equivalent based on the alphabet. For example:
0 => a
1 => b
2 => c
3 => d
etc.
If you are looking for TypeScript working functions then follow
public numericValue = (alphaChar: any) => alphaChar.toUpperCase().charCodeAt(0) - 64;
public alphaValue = (numericDigit: any) =>
String.fromCharCode(64 + numericDigit) : '';
You can make several checks like (numericDigit >= 1 && numericDigit <= 26) ?
inside function body as per the requirements.