add chr() and ord()
neuhaus opened this issue · comments
S. Neuhaus commented
ord is usually handled by the external "od" command.
chr() {
[ "$1" -lt 256 ] || return 1
printf "\\$(printf '%03o' "$1")"
}
ord() {
LC_CTYPE=C printf '%d' "'$1"
}