[Toybox] [toybox] fold implementation
Samuel Holland
samuel at sholland.net
Wed Apr 2 18:25:46 PDT 2014
Hello, everyone.
Here is a basic implementation of fold[0]. It does not support multibyte characters, though that would probably just require more switch cases. This is my first contribution, so please comment your thoughts/what I can improve.
I was planning to write an "unfold" utility that basically did the opposite. Although I don't think it's in any standard, would it still be of any interest?
[0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/fold.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fold.patch
Type: application/octet-stream
Size: 2427 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20140402/8cfb4862/attachment-0002.obj>
-------------- next part --------------
Regards,
Samuel Holland <samuel at sholland.net>
More information about the Toybox
mailing list