Commits
Doug Gregor committed 3fbd9682a10
Update the printf() implementation to match the May demo slides. Major
changes include:
- Each '%' in the format string is followed by some number of
non-alpha characters (the "layout") and then an alpha character
(the "kind"). The string and character are passed along to each
FormattedPrintable's printFormatted() so they can do custom
formatting
- The Format struct is now used for the 'default' layout, which all
of the standard libaries use
- Added 'x' and 'o' custom formatting for formatting numbers in hex
and octal, respectively. 'u' and 'l' can be used to print
characters in uppercase or lowercase (String versions are yet to
come).
- The code for splitFormat()/printf() match what will be on the
slides. They use the split operations to keep the whole thing
linear, rather than performing inefficient slices.
There are some ugly hacks here due to <rdar://problem/11529601>.
Swift SVN r1980