minor cleanup
parent
a761d57019
commit
2179b4bca1
|
@ -16,10 +16,11 @@ IN: tools.hexdump
|
||||||
16 * >hex 8 CHAR: 0 pad-head write "h: " write ;
|
16 * >hex 8 CHAR: 0 pad-head write "h: " write ;
|
||||||
|
|
||||||
: >hex-digit ( digit -- str )
|
: >hex-digit ( digit -- str )
|
||||||
>hex 2 CHAR: 0 pad-head " " append ;
|
>hex 2 CHAR: 0 pad-head ;
|
||||||
|
|
||||||
: >hex-digits ( bytes -- str )
|
: >hex-digits ( bytes -- str )
|
||||||
[ >hex-digit ] { } map-as concat 48 CHAR: \s pad-tail ;
|
[ >hex-digit " " append ] { } map-as concat
|
||||||
|
48 CHAR: \s pad-tail ;
|
||||||
|
|
||||||
: >ascii ( bytes -- str )
|
: >ascii ( bytes -- str )
|
||||||
[ [ printable? ] keep CHAR: . ? ] "" map-as ;
|
[ [ printable? ] keep CHAR: . ? ] "" map-as ;
|
||||||
|
|
Loading…
Reference in New Issue