The problems:
- I can't use string.Format, I have C style format strings;
- I can't call the native printf (no P/Invoke);
- I can't use http://www.codeproject.com/KB/printing/PrintfImplementationinCS.aspx because of the license, I need something GPL-compatible.
Is there a free implementation of printf/sprintf for the .net framework? Other than the above link, I couldn't find anything.
Thanks!
Update:
Thanks for the help, even though you couldn't find anything. That means I'll just have to do it myself (I was trying to avoid it, but oh well...)
I cooked up a sprintf function that supports basic format strings, you can find it here: https://sourceforge.net/projects/printfnet/. I'll try to make it a complete implementation if I can.