[your code here] minimal hex viewer

2018-01-03 Thread Justin Whear via Digitalmars-d
// Reads bytes from stdin and writes a hexadecimal view like a no-frills xxd. // All the actual formatting work is done by format's sweet range syntax void main(string[] args) { import std.getopt; uint bytesPerLine = 8; args.getopt( "cols|c", &bytesPerLine

Re: [your code here] minimal hex viewer

2018-01-03 Thread H. S. Teoh via Digitalmars-d
On Thu, Jan 04, 2018 at 12:25:59AM +, Justin Whear via Digitalmars-d wrote: > // Reads bytes from stdin and writes a hexadecimal view like a no-frills > xxd. > // All the actual formatting work is done by format's sweet range syntax Mmm, I like this! Care to submit a PR for this in the dlang.

Re: [your code here] minimal hex viewer

2018-01-03 Thread Seb via Digitalmars-d
On Thursday, 4 January 2018 at 00:35:56 UTC, H. S. Teoh wrote: On Thu, Jan 04, 2018 at 12:25:59AM +, Justin Whear via Digitalmars-d wrote: // Reads bytes from stdin and writes a hexadecimal view like a no-frills xxd. // All the actual formatting work is done by format's sweet range syntax

Re: [your code here] minimal hex viewer

2018-01-03 Thread Justin Whear via Digitalmars-d
On Thursday, 4 January 2018 at 00:54:12 UTC, Seb wrote: On Thursday, 4 January 2018 at 00:35:56 UTC, H. S. Teoh wrote: On Thu, Jan 04, 2018 at 12:25:59AM +, Justin Whear via Digitalmars-d wrote: // Reads bytes from stdin and writes a hexadecimal view like a no-frills xxd. // All the actual