8 #ifndef CSCORE_C_UTIL_H_ 9 #define CSCORE_C_UTIL_H_ 14 #include <wpi/StringRef.h> 15 #include <wpi/memory.h> 21 std::memmove(out, in.
data(), in.
size());
22 out[in.
size()] =
'\0';
28 #endif // CSCORE_C_UTIL_H_ Definition: CvSourceImpl.h:19
void * CheckedMalloc(size_t size)
Wrapper around std::malloc that calls std::terminate on out of memory.
Definition: memory.cpp:25
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE const char * data() const noexcept
data - Get a pointer to the start of the string (which may not be null terminated).
Definition: StringRef.h:128
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const noexcept
size - Get the string size.
Definition: StringRef.h:138