Workspace 6.21.5
Namespaces | Macros | Functions
stringhelpers.h File Reference
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <sstream>
#include <string>
#include <QJsonDocument>
#include <QJsonObject>
#include <QString>
#include <QStringList>
#include "Workspace/Application/logmanager.h"
#include "errorchecks.h"
Include dependency graph for stringhelpers.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  CSIRO
 Top level namespace for all Workspace code.
 
namespace  CSIRO::Application
 Application-level functionality for all workspace applications.
 

Macros

#define STRINGIFY(x)   #x
 
#define TOSTRING(x)   STRINGIFY(x)
 
#define WS_CONCAT(x, y)   x##y
 
#define WS_CONCAT3(x, y, z)   x##y##z
 

Functions

template<typename T , size_t S>
constexpr size_t getFileNameOffset (const T(&str)[S], size_t i=S - 1)
 
template<typename T >
constexpr size_t getFileNameOffset (T(&str)[1])
 
bool jsonFromString (const QString &jsonStr, QJsonDocument &result, bool logParseError=false)
 
bool keysMatch (const std::string &s1, const std::string &s2)
 
bool KeysMatch (const std::string &s1, const std::string &s2)
 
QStringList regexpSplit (const QRegExp &regexp, const QString &str)
 
QString sizeString (size_t bytes)
 
template<typename T >
std::string ToString (const T &obj)
 
std::string & trimBlanks (std::string &s)
 
std::string & TrimBlanks (std::string &s)
 

Macro Definition Documentation

◆ STRINGIFY

#define STRINGIFY (   x)    #x

◆ TOSTRING

#define TOSTRING (   x)    STRINGIFY(x)

◆ WS_CONCAT

#define WS_CONCAT (   x,
  y 
)    x##y

◆ WS_CONCAT3

#define WS_CONCAT3 (   x,
  y,
  z 
)    x##y##z