ref: 89363fe7fc174052ede24bcec2e28eacf26e39ed
parent: fce00d2eea950d46cab89b42b9cf729e7b1db459
author: Ori Bernstein <[email protected]>
date: Fri Aug 29 13:10:16 EDT 2014
Add support for '%%' format specifier For all your '%' printing needs!
--- a/libstd/fmt.myr
+++ b/libstd/fmt.myr
@@ -263,8 +263,11 @@
| 'p':
(p_val, ap) = vanext(ap)
n += intfmt(buf[n:], p_val castto(int64), 16, false, padto, padfill)
- | 'c': (c_val, ap) = vanext(ap)
- n += encode(buf[n:], c_val)
+ | 'c':
+ (c_val, ap) = vanext(ap)
+ n += encode(buf[n:], c_val)
+ | '%':
+ n += encode(buf[n:], '%')
| _:
die("Unknown format specifier\n")
;;