Swapping nibbles range style

Justin Whear justin at economicmodeling.com
Tue Dec 10 15:26:01 PST 2013


On Tue, 10 Dec 2013 23:08:16 +0100, Volcz wrote:

> Hi!
> As a small exercise I've been trying to implement a nibble swapping
> method which utilizes D's ranges.
> 
> I received some help from eco on #d but still couldn't complete it.
> his contribution: http://dpaste.dzfl.pl/f228d0a8
> 
> Example:
> Input  1234 Output 2143
> 
> This is going to be used to build a small utility program which can be
> used "echo 1234 | nibbleswap"
> 
> Help is appreciated!

How's this?
http://dpaste.dzfl.pl/135285f4


More information about the Digitalmars-d-learn mailing list