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 49x 49x 46x 46x 58x 58x 46x 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; } |