change the signature of Ox.pad to match Ox.truncate

This commit is contained in:
rolux 2012-06-04 11:08:38 +02:00
commit a5c6747b57
10 changed files with 62 additions and 29 deletions

View file

@ -189,7 +189,9 @@
if (code < 128) {
char = char in htmlEntities ? htmlEntities[char] : char;
} else if (encodeAll) {
char = '&#x' + Ox.pad(code.toString(16).toUpperCase(), 4) + ';';
char = '&#x'
+ Ox.pad(code.toString(16).toUpperCase(), 'left', 4, '0')
+ ';';
}
return char;
});