MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / readQuotedString

Method readQuotedString

JUCE/modules/juce_core/xml/juce_XmlDocument.cpp:341–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341void XmlDocument::readQuotedString (String& result)
342{
343 auto quote = readNextChar();
344
345 while (! outOfData)
346 {
347 auto c = readNextChar();
348
349 if (c == quote)
350 break;
351
352 --input;
353
354 if (c == '&')
355 {
356 readEntity (result);
357 }
358 else
359 {
360 auto start = input;
361
362 for (;;)
363 {
364 auto character = *input;
365
366 if (character == quote)
367 {
368 result.appendCharPointer (start, input);
369 ++input;
370 return;
371 }
372
373 if (character == '&')
374 {
375 result.appendCharPointer (start, input);
376 break;
377 }
378
379 if (character == 0)
380 {
381 setLastError ("unmatched quotes", false);
382 outOfData = true;
383 break;
384 }
385
386 ++input;
387 }
388 }
389 }
390}
391
392XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements)
393{

Callers

nothing calls this directly

Calls 1

appendCharPointerMethod · 0.80

Tested by

no test coverage detected