sheetjs_sheetjs/packages/ssf/bits/59_numhelp.js
2022-03-09 06:28:19 -05:00

6 lines
242 B
JavaScript

var pct1 = /%/g;
function write_num_pct(type/*:string*/, fmt/*:string*/, val/*:number*/)/*:string*/{
var sfmt = fmt.replace(pct1,""), mul = fmt.length - sfmt.length;
return write_num(type, sfmt, val * Math.pow(10,2*mul)) + fill("%",mul);
}