| 63 | constexpr int64_t MAX_NANOS = 1'000'000'000; |
| 64 | |
| 65 | std::string utf32ToUtf8(const std::u32string& utf32) { |
| 66 | icu::UnicodeString ustr = icu::UnicodeString::fromUTF32( |
| 67 | reinterpret_cast<const UChar32*>(utf32.data()), utf32.size()); |
| 68 | |
| 69 | std::string result; |
| 70 | ustr.toUTF8String(result); |
| 71 | return result; |
| 72 | } |
| 73 | // Structure to help temporary changes to Options. This objects saves the |
| 74 | // current state of the Options object, and restores it when it's destructed. |
| 75 | // For instance, if you would like to temporarily disable nulls for a particular |
no test coverage detected