MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / toStringView

Function toStringView

src/openrct2/core/String.cpp:118–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 }
117
118 std::string_view toStringView(const char* ch, size_t maxLen)
119 {
120 size_t len{};
121 for (size_t i = 0; i < maxLen; i++)
122 {
123 if (ch[i] == '\0')
124 {
125 break;
126 }
127
128 len++;
129 }
130 return std::string_view(ch, len);
131 }
132
133 bool isNullOrEmpty(const utf8* str)
134 {

Callers 3

WriteStringMethod · 0.85
ImportMethod · 0.85
SelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected