minor cleanup

db4
Doug Coleman 2009-04-09 21:03:42 -05:00
parent a761d57019
commit 2179b4bca1
1 changed files with 3 additions and 2 deletions

View File

@ -16,10 +16,11 @@ IN: tools.hexdump
16 * >hex 8 CHAR: 0 pad-head write "h: " write ;
: >hex-digit ( digit -- str )
>hex 2 CHAR: 0 pad-head " " append ;
>hex 2 CHAR: 0 pad-head ;
: >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 )
[ [ printable? ] keep CHAR: . ? ] "" map-as ;