MCPcopy Create free account
hub / github.com/crossuo/crossuo / GetTokens

Method GetTokens

xuocore/text_parser.cpp:265–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265std::vector<astr_t> TextFileParser::GetTokens(const astr_t &str, bool trim)
266{
267 m_Trim = trim;
268 std::vector<astr_t> result;
269
270 uint8_t *oldEnd = m_End;
271 m_Ptr = (uint8_t *)str.c_str();
272 m_End = m_Ptr + str.size();
273 m_EOL = m_End;
274
275 SaveRawLine();
276 while (m_Ptr < m_EOL)
277 {
278 SkipToData();
279 if (IsComment())
280 {
281 break;
282 }
283 auto buf = ObtainQuotedData();
284 if (buf.length() != 0u)
285 {
286 result.push_back(buf);
287 }
288 }
289
290 m_End = oldEnd;
291 return result;
292}

Callers 5

load_body_corpse_defFunction · 0.80
IndexReplacesMethod · 0.80
PACKET_HANDLERFunction · 0.80
ConvertMethod · 0.80

Calls 4

c_strMethod · 0.80
lengthMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected