1 -> 26 -> 27 = A -> Z -> AA
function convert(num){
return num <= 26 ?
String.fromCharCode(num + 64) : convert(~~((num - 1) / 26)) + convert(num % 26 || 26);
}
1 -> 26 -> 27 = A -> Z -> AA
function convert(num){
return num <= 26 ?
String.fromCharCode(num + 64) : convert(~~((num - 1) / 26)) + convert(num % 26 || 26);
}
本文标题:10进制数字转为26进制的字母
本文链接:https://www.haomeiwen.com/subject/ekfphxtx.html
网友评论