MCPcopy Create free account
hub / github.com/bytedance/bolt / utf32ToUtf8

Function utf32ToUtf8

bolt/vector/fuzzer/VectorFuzzer.cpp:65–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63constexpr int64_t MAX_NANOS = 1'000'000'000;
64
65std::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

Callers 1

randStringFunction · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected