Write a function that implements C
printf-style string formatting.
- You must implement at least
- You must not use a built-in string formatting method.
- You must not run external programs or connect to the Internet from your program.
- It's up to you to decide how to handle invalid input, but your program must not terminate abnormally.
- You should write a variadic function if possible.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.