#include <QString>
#include <algorithm>
#include <string>
Go to the source code of this file.
|
| QString | nameFromStdString (const std::string &_string) |
| | Returns a QString from a std::string, truncated to at most MAX_NAME_LENGTH bytes.
|
| QString | textFromStdString (const std::string &_string) |
| | Returns a QString from a std::string, truncated to at most MAX_TEXT_LENGTH bytes.
|
| QString | textTailFromStdString (const std::string &_string) |
| | Returns a QString from a std::string, truncated to at most MAX_TEXT_LENGTH bytes, keeping the tail.
|
| QString | fileFromStdString (const std::string &_string) |
| | Returns a QString from a std::string, truncated to at most MAX_FILE_LENGTH bytes.
|
|
| constexpr int | MAX_NAME_LENGTH = 0xff |
| | Max size for short strings, like names and things that are generally a single phrase.
|
| constexpr int | MAX_TEXT_LENGTH = 0xfff |
| | Max size for chat messages and text contents.
|
| constexpr int | MAX_FILE_LENGTH = 0x1fffff |
| | Max size for deck files and pictures (about 2 megabytes).
|
◆ fileFromStdString()
| QString fileFromStdString |
( |
const std::string & | _string | ) |
|
|
inline |
Returns a QString from a std::string, truncated to at most MAX_FILE_LENGTH bytes.
◆ nameFromStdString()
| QString nameFromStdString |
( |
const std::string & | _string | ) |
|
|
inline |
Returns a QString from a std::string, truncated to at most MAX_NAME_LENGTH bytes.
◆ textFromStdString()
| QString textFromStdString |
( |
const std::string & | _string | ) |
|
|
inline |
Returns a QString from a std::string, truncated to at most MAX_TEXT_LENGTH bytes.
◆ textTailFromStdString()
| QString textTailFromStdString |
( |
const std::string & | _string | ) |
|
|
inline |
Returns a QString from a std::string, truncated to at most MAX_TEXT_LENGTH bytes, keeping the tail.
◆ MAX_FILE_LENGTH
| int MAX_FILE_LENGTH = 0x1fffff |
|
constexpr |
Max size for deck files and pictures (about 2 megabytes).
◆ MAX_NAME_LENGTH
| int MAX_NAME_LENGTH = 0xff |
|
constexpr |
Max size for short strings, like names and things that are generally a single phrase.
◆ MAX_TEXT_LENGTH
| int MAX_TEXT_LENGTH = 0xfff |
|
constexpr |
Max size for chat messages and text contents.