MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / nativeSpan

Function nativeSpan

Libraries/Testing/Testing.cpp:55–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53#endif
54
55static StringSpan nativeSpan(const native_char_t* text, size_t length, bool nullTerminated = false)
56{
57#if SC_PLATFORM_WINDOWS
58 return StringSpan({text, length}, nullTerminated, StringEncoding::Native);
59#else
60 return StringSpan({text, length}, nullTerminated, StringEncoding::Native);
61#endif
62}
63
64static size_t nativeLength(StringSpan view) { return view.sizeInBytes() / sizeof(native_char_t); }
65

Callers 2

assignNativeSliceFunction · 0.85
pathJoinFunction · 0.85

Calls 1

StringSpanFunction · 0.85

Tested by

no test coverage detected