bolt/bootstrap/cxx/deps/icu/source/test/fuzzer/locale_util.cpp
Sam Vervaeck 285f33e93c Add 'bootstrap/cxx/' from commit '7c1a929e9a3d3abb1e2113f531588e059ad5be8c'
git-subtree-dir: bootstrap/cxx
git-subtree-mainline: b732e418cb
git-subtree-split: 7c1a929e9a
2024-01-15 14:04:51 +01:00

12 lines
358 B
C++

// © 2019 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// Helper method for ICU locale fuzzer.
#include "locale_util.h"
#include <string>
std::string MakeZeroTerminatedInput(const uint8_t *data, int32_t size) {
return size == 0 ? "" : std::string(reinterpret_cast<const char *>(data), size);
}