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

Attachment: fold.patch
Description: Binary data



Regards,
Samuel Holland <sam...@sholland.net>
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to