Always print two bytes when converting text to hex

This commit is contained in:
Daniel - 2021-11-06 15:35:29 +01:00
parent 0d1fe48e6f
commit ef2932fed7
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ might depend on the coding system of the current buffer."
(buffer-substring-no-properties (region-beginning) (region-end)) (buffer-substring-no-properties (region-beginning) (region-end))
(read-from-minibuffer "String (ascii): ")))) (read-from-minibuffer "String (ascii): "))))
(let ((result (->> text-string (let ((result (->> text-string
(--map (format "%2X " it)) (--map (format "%02X " it))
(apply #'concat) (apply #'concat)
(string-trim-right)))) (string-trim-right))))
(if (use-region-p) (if (use-region-p)