/* ------------------------------------------------------------------------- * BKG NTRIP Client * ------------------------------------------------------------------------- * * Class: bncutils * * Purpose: Auxiliary Functions * * Author: L. Mervart * * Created: 30-Aug-2006 * * Changes: * * -----------------------------------------------------------------------*/ #include #include #include "bncutils.h" void expandEnvVar(QString& str) { QRegExp rx("(\\$\\{.+\\})"); if (rx.indexIn(str) != -1) { QStringListIterator it(rx.capturedTexts()); if (it.hasNext()) { QString rxStr = it.next(); QString envVar = rxStr.mid(2,rxStr.length()-3); str.replace(rxStr, qgetenv(envVar.toAscii())); } } }