StringUtils is a collection of string manipulation functions.
More...
|
| QByteArray | demangle (const char *name) |
| | Demangle names used by the compiler for example "N12MultiWidgets11ImageWidgetE" -> "MultiWidgets::ImageWidget" If the name can't be parsed, the original string is returned. More... |
| |
| void | eraseNonVisibles (QString &s) |
| | Remove non-visible characters from QString. More... |
| |
| template<typename T > |
std::enable_if<!std::is_enum
< T >::value, T >::type | fromString (const QByteArray &str) |
| | Convert string to type T. More... |
| |
| template<typename T > |
std::enable_if< std::is_enum
< T >::value, T >::type | fromString (const QByteArray &str) |
| | Convert string to type T. More... |
| |
| template<class T > |
std::enable_if<!std::is_enum
< T >::value, QString >::type | toString (const T &x) |
| | Converts to string. More... |
| |
|
template<typename T > |
std::enable_if< std::is_enum
< T >::value, QString >::type | toString (const T &x) |
| |
| template<> |
| QString | toString< bool > (const bool &b) |
| | Convert boolean to string. More... |
| |
|
template<typename T > |
| QByteArray | type (const T &t) |
| |
StringUtils is a collection of string manipulation functions.
| QByteArray Radiant::StringUtils::demangle |
( |
const char * |
name | ) |
|
Demangle names used by the compiler for example "N12MultiWidgets11ImageWidgetE" -> "MultiWidgets::ImageWidget" If the name can't be parsed, the original string is returned.
- Parameters
-
- Returns
- Demangled symbol name
| void Radiant::StringUtils::eraseNonVisibles |
( |
QString & |
s | ) |
|
Remove non-visible characters from QString.
- Parameters
-
template<typename T >
| std::enable_if<!std::is_enum<T>::value, T>::type Radiant::StringUtils::fromString |
( |
const QByteArray & |
str | ) |
|
|
inline |
Convert string to type T.
- Parameters
-
- Returns
- Value converted from string
- Template Parameters
-
template<typename T >
| std::enable_if<std::is_enum<T>::value, T>::type Radiant::StringUtils::fromString |
( |
const QByteArray & |
str | ) |
|
|
inline |
Convert string to type T.
- Parameters
-
- Returns
- Value converted from string
- Template Parameters
-
template<class T >
| std::enable_if<!std::is_enum<T>::value, QString>::type Radiant::StringUtils::toString |
( |
const T & |
x | ) |
|
|
inline |
Converts to string.
- Parameters
-
- Returns
- Value as a string
- Template Parameters
-
| T | Type of the value to convert |
Convert boolean to string.
- Parameters
-
- Returns
- "1" or "0"