hx specifier doesn't work
kurdibogdan opened this issue · 3 comments
kurdibogdan commented
%hx specifier is for short hexadecimal numbers (typically 2 bytes). For example:
sprintf("%hX\n", 65536); // = hexa 0
sprintf("%X\n", 65536); // = hexa 10000
The javascript version of sprintf throws error:
SyntaxError: [sprintf] unexpected placeholder
alexei commented
What's a "short hexadecimal number" in JavaScript?
kurdbohu commented
I mean, a short integer (typically 2 bytes) represented in hexadecimal form (largest number = 0xFFFF).
alexei commented
JS has int
s and that's it