MCPcopy Create free account
hub / github.com/beefytech/Beef / GetNextStringView

Method GetNextStringView

BeefySysLib/gfx/glTF.cpp:210–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 }
209
210 bool GetNextStringView(StringView& prefix, StringView& value)
211 {
212 auto node = GetNext();
213 if (node.mKind != NodeKind_String)
214 return false;
215 auto stringView = StringView(mStart + node.mStart, node.mEnd - node.mStart);
216 if (!stringView.EndsWith('\''))
217 {
218 prefix = "";
219 value = stringView;
220 return true;
221 }
222 int strStartIdx = (int)stringView.IndexOf('\'');
223 prefix = StringView(stringView, 0, strStartIdx);
224 value = StringView(stringView, strStartIdx + 1, (int)stringView.mLength - strStartIdx - 2);
225 return true;
226 }
227};
228
229enum ComponentType

Callers 2

ParseMaterialDefMethod · 0.80
LoadModelPropsMethod · 0.80

Calls 3

StringViewClass · 0.85
EndsWithMethod · 0.45
IndexOfMethod · 0.45

Tested by

no test coverage detected