Ideally I could specify something like 10 as my input (in ounces) and get back a string like this: "1 & 1/4 cups". Is there a library that can do something like this? (note: I am totally fine with the rounding implicit in something like this).

Note: I would prefer a C library, but I am OK with solutions for nearly any language as I can probably find appropriate bindings.