Commit 38a43ee
committed
Fix cctz::format()/parse() to treat NULs like any other chars
The previous commit (PR google#337) was couched in terms of `parse()`
rejecting input strings containing NULs. Instead, we should
treat NULs like other characters by allowing them in both the
format and input strings.
Similarly, `format()` should allow NULs in its format string.
Also:
- Simplify `FormatTM()` calls by handling an empty format
string internally, rather than by guarding each invocation.
- Utilize the `std::string` iterator-pair constructor and
`append()`.1 parent 58b6d4b commit 38a43ee
2 files changed
Lines changed: 166 additions & 96 deletions
0 commit comments