Conversation
|
These two additional functions are nice. |
numberToHex does the same thing. Could we write some tests to verify the functionality? See here: https://leafo.net/guides/testing-lua-modules-with-github-actions.html |
|
numberToHex has only one parameter, I can't pass a length to it, so it can't do the same thing. |
Is this used for padding the values with zeros? The new function just converts the value to a HEX notation. |
|
You could turn the length argument into an optional argument: function numberToHex(num, bytes)
return string.format('%' .. (bytes and '0' .. bytes * 2 or '') .. 'X', num)
end |
No description provided.