-
Notifications
You must be signed in to change notification settings - Fork 1
CMD hex
Displays content of the active file or a specified text in hex format.
Usage
hex [<text>] [/u8] [/u16]
[`<position>] [~<length>]
text is the string to be displayed. If there are space characters in text, enclose it in double quotation marks ". Or use text block (press ALT+T to insert) to contain arbitrary text. If text is omitted, the content of active file will be displayed instead.
/u8, /u16 switches indicate what encoding text uses. They represent UTF-8 and UTF-16 respectively. UTF-8 is default if none of them is specified.
position specifies the begin position of file content to display. It is prefixed with a backtick `. The default is 0 if it is omitted.
length specifies the length of file content to display. It is prefixed with a ~. The default is 128 if it is omitted. The max supported length is 4096. Use double ~ to specify the max length, for example ~~.
Both position and length can be in decimal or hexadecimal format. Use x or 0x as prefix for hexadecimal.
Example
Display 32 bytes of file content starts from 8:
hex `8 ~32
Display a specified text which is in UTF-16:
hex "This is a UTF-16 string." /u16