MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / cleanPrefix

Function cleanPrefix

src/core/CtyDatParser.cpp:15–23  ·  view source on GitHub ↗

Strip zone overrides "(xx)" and "[xx]" and leading "=" from a prefix token.

Source from the content-addressed store, hash-verified

13
14// Strip zone overrides "(xx)" and "[xx]" and leading "=" from a prefix token.
15static QString cleanPrefix(const QString& raw)
16{
17 QString s = raw.trimmed();
18 // remove zone overrides like (14) and [14]
19 static const QRegularExpression zoneRe(R"(\([^)]*\)|\[[^\]]*\])");
20 s.remove(zoneRe);
21 s = s.trimmed();
22 return s;
23}
24
25// ---------------------------------------------------------------------------
26// Public API

Callers 1

parseMethod · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected