MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / genSpan

Function genSpan

lib/api/wasmedge.cpp:267–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265// Helper function for making a Span to a uint8_t array.
266template <typename T>
267inline constexpr Span<const T> genSpan(const T *Buf,
268 const uint64_t Len) noexcept {
269 if (Buf && Len > 0) {
270 return Span<const T>(Buf, Len);
271 }
272 return Span<const T>();
273}
274
275// Helper functions for converting WasmEdge_String to std::String.
276inline std::string_view genStrView(const WasmEdge_String S) noexcept {

Calls

no outgoing calls

Tested by

no test coverage detected