A very handy tool to convert/search between ascii
strings/characters and corresponding ascii
values.
This simple utility is implemented with C
, using standard libraries stdio.h
, stdlib.h
and string.h
only, which lends enough portability among various platforms. It's designed for coding especially for embedded coding. If you often deal with massive, tedious VPD field
programing with Hex
or Decimal
data format, this utility should be helpful to transform or validate data.
Just go with gcc
/clang
or any other C
compiler following C99/C11/C14
standard, the executable ascii
under folder ./bin/MacOS
is compiled by clang
of MacOS Mojave
with -O2
level compiler optimization. If you are Mac users, use this executable directly.
Only --help
, -h
or -?
option given will get help
usage, otherwise, the argument will be treated as an input string.
Command doesn't take Null
argument, so if no argument is specified, default argument is whitespace
.
Utility can detect input data format, if a string number containing character A-F
or a-f
is given, string will be taken as Hex
data, otherwise, it wil be taken as Decimal
data, you can also add prefix 0x
/0X
or suffix h
/H
to mark it as a Hex
format data string.
If some invalid data is taken, wrong-format
error message will be printed.
If input data exceeds 127
, overflow
error message will be printed.