MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / subList

Function subList

lib/extensionsystem/pluginmanager.cpp:522–534  ·  view source on GitHub ↗

Extract a sublist from the serialized arguments * indicated by a keyword starting with a colon indicator: * ":a,i1,i2,:b:i3,i4" with ":a" -> "i1,i2" */

Source from the content-addressed store, hash-verified

520 * ":a,i1,i2,:b:i3,i4" with ":a" -> "i1,i2"
521 */
522static QStringList subList(const QStringList &in, const QString &key)
523{
524 QStringList rc;
525 // Find keyword and copy arguments until end or next keyword
526 const QStringList::const_iterator inEnd = in.constEnd();
527 QStringList::const_iterator it = qFind(in.constBegin(), inEnd, key);
528 if (it != inEnd) {
529 const QChar nextIndicator = QLatin1Char(':');
530 for (++it; it != inEnd && !it->startsWith(nextIndicator); ++it)
531 rc.append(*it);
532 }
533 return rc;
534}
535
536/*!
537 Parses the options encoded by serializedArguments() const

Callers 2

remoteArgumentsMethod · 0.85
foreachFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected