MCPcopy Create free account
hub / github.com/Schildkroet/Candle2 / parseMCodes

Method parseMCodes

src/parser/gcodepreprocessorutils.cpp:120–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120QList<int> GcodePreprocessorUtils::parseMCodes(QString command)
121{
122 static QRegExp re("[Mm]0*(\\d+)");
123
124 QList<int> codes;
125 int pos = 0;
126
127 while ((pos = re.indexIn(command, pos)) != -1) {
128 codes.append(re.cap(1).toInt());
129 pos += re.matchedLength();
130 }
131
132 return codes;
133}
134
135/**
136* Update a point given the arguments of a command.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected