diff options
author | Julian Sitkevich <1553398+sitkevij@users.noreply.github.com> | 2020-11-09 08:33:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 08:33:08 -0800 |
commit | 2e34704eba10e0619d5ddcb5f98cce0d06f53d9e (patch) | |
tree | cf10fde4db1267cabf3895880395a1ceaae8cb10 /README.md | |
parent | de4c13e8c3703773a746cff9df7cd02b3e8c7f8b (diff) | |
parent | 0f46232ac1af1c792d4f5b74e80e5fed07d8e4fb (diff) |
Merge pull request #47 from sitkevij/developv0.3.2
develop -> master for 0.3.2
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 33 |
1 files changed, 30 insertions, 3 deletions
@@ -93,9 +93,9 @@ If `<USERDIR>/.cargo/bin` is part of the `PATH` environment variable, `hx` shoul ## features -### output arrays in `rust`, `c` or `golang` +### output arrays in `rust`, `c`, `golang`, `python`, `kotlin`, or `java` -`hx` has a feature which can output the input file bytes as source code arrays. +`hx` has a feature which can output the input file bytes as source code arrays. For example: @@ -126,6 +126,33 @@ a := [3]byte{ } ``` +#### python array: -ap + +```sh +$ hx -ap -c8 tests/files/tiny.txt +a = [ + 0x69, 0x6c, 0x0a +] +``` + +#### kotlin array: -ak + +```sh +$ hx -ak -c8 tests/files/tiny.txt +val a = byteArrayOf( + 0x69, 0x6c, 0x0a +) +``` + +#### java array: -aj + +```sh +$ hx -aj -c8 tests/files/tiny.txt +byte[] a = new byte[]{ + 0x69, 0x6c, 0x0a +}; +``` + ## manual ```txt @@ -141,7 +168,7 @@ FLAGS: -V, --version Prints version information OPTIONS: - -a, --array <array_format> Set source code format output: rust (r), C (c), golang (g) [possible values: r, c, g] + -a, --array <array_format> Set source code format output: rust (r), C (c), golang (g), python (p), kotlin (k), java (j) [possible values: r, c, g, p, k, j] -t, --color <color> Set color tint terminal output. 0 to disable, 1 to enable [possible values: 0, 1] -c, --cols <columns> Set column length -f, --format <format> Set format of octet: Octal (o), LowerHex (x), UpperHex (X), Binary (b) [possible |