Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1x 62x 62x 59x 59x 157x 157x 59x 3x | /**
* @internal
* Convert english alphabet numbers into decimal numbers
* @param letter The letter that needs to be converted
* @returns
*/
export function convertAlphaToDecimals(letter: string): number | undefined {
const alpha = letter.toUpperCase();
if (alpha) {
let result = 0;
for (let i = 0; i < alpha.length; i++) {
const charCode = alpha.charCodeAt(i) - 65 + 1;
result = result * 26 + charCode;
}
return result;
}
return undefined;
}
|