MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / nullTerminatedGlobalView

Method nullTerminatedGlobalView

Sources/Shared/Containers/String.cpp:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 }
40
41 String String::nullTerminatedGlobalView(StringView view) {
42 if ((view.flags() & (StringViewFlags::NullTerminated | StringViewFlags::Global)) == (StringViewFlags::NullTerminated | StringViewFlags::Global)) {
43 String out{view.data(), view.size(), [](char*, std::size_t) {}};
44 out._large.size |= std::size_t(StringViewFlags::Global);
45 return out;
46 }
47 return String{view};
48 }
49
50 String String::nullTerminatedGlobalView(AllocatedInitT, StringView view) {
51 if ((view.flags() & (StringViewFlags::NullTerminated | StringViewFlags::Global)) == (StringViewFlags::NullTerminated | StringViewFlags::Global)) {

Callers

nothing calls this directly

Calls 3

flagsMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected