|
stmm-games-doc
0.32.0
|
Functions | |
| template<typename ... T> | |
| std::string | stringCompose (const std::string &sFormat, const T &... oParam) noexcept |
| Format a string. More... | |
| std::string | strStrip (const std::string &sStr) noexcept |
| Strips a string of its leading and trailing space characters. More... | |
| bool | strContainsWhitespace (const std::string &sStr) noexcept |
| Whether a string contains whitespace characters. More... | |
| void | strTextToLines (const std::string &sText, std::vector< std::string > &aLine) noexcept |
| Adds lines contained in a string to a vector of strings. More... | |
| int32_t | strUTF8SizeInCodePoints (const std::string &sUtf8) noexcept |
| UTF8 string size in code points rather than bytes. More... | |
| std::string | intToMillString (int32_t nValue) noexcept |
| Formats integer with every 3 digits separator. More... | |
| std::string | millisecToMinSecString (int32_t nMilliseconds) noexcept |
| Formats milliseconds to minutes and seconds. More... | |
| std::string | secToMinSecString (int32_t nSeconds) noexcept |
| Formats seconds to minutes. More... | |
| std::pair< bool, std::string > | strToBool (const std::string &sStr) |
| Convert a string to boolean. More... | |
| template<class LT > | |
| bool | listContains (std::list< LT > &oList, const LT &oValue, typename std::list< LT >::iterator &it) noexcept |
| template<class LT > | |
| bool | listContains (const std::list< LT > &oList, const LT &oValue) noexcept |
| template<class LT > | |
| bool | listExtract (std::list< LT > &oList, const LT &oValue) noexcept |
| template<class ValueType > | |
| bool | vectorContains (const std::vector< ValueType > &oVector, const ValueType &oValue) noexcept |
| int32_t | packPointToInt32 (NPoint oXY) noexcept |
| Packs a point (64 bit) to an int32_t. More... | |
| NPoint | unpackPointFromInt32 (int32_t nXY) noexcept |
| Unpacks a point (64 bit) from an int32_t. More... | |
| int64_t | packPointToInt64 (NPoint oXY) noexcept |
| Packs a point to an int64_t. More... | |
| NPoint | unpackPointFromInt64 (int64_t nXY) noexcept |
| Unpacks a point from an int64_t. More... | |
| std::pair< int32_t, int32_t > | unpackPairFromInt64 (int64_t nXY) noexcept |
| Unpacks a XY pair from an int64_t. More... | |
|
noexcept |
Formats integer with every 3 digits separator.
Ex. 12345678 is formatted as "12'345'678".
| nValue | The value. |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Formats milliseconds to minutes and seconds.
Ex. 1001 outputs string "0:01.001"
| nMilliseconds | The value in milliseconds. |
|
inlinenoexcept |
Packs a point (64 bit) to an int32_t.
| oXY | The point to pack. Both m_nX and m_nY must be >= -16384 and < 16384. |
|
inlinenoexcept |
Packs a point to an int64_t.
| oXY | The point to pack. |
|
noexcept |
Formats seconds to minutes.
Ex. 61 outputs string "1:01"
| nSeconds | The value in seconds. |
|
noexcept |
Whether a string contains whitespace characters.
| sStr | The string. Can be empty. |
|
noexcept |
Format a string.
Ex. stringCompose("%2ce I saw %1 b%2s", 2, "one") returns "once I saw 2 bones"
| sFormat | The format string. |
| oParam | The parameters to be inserted in the format string. |
|
noexcept |
Strips a string of its leading and trailing space characters.
Ex. " HI there " to "HI there".
| sStr | The string to strip. |
|
noexcept |
Adds lines contained in a string to a vector of strings.
| sText | The string containing the text. |
| aLine | The vector of strings to which the single lines are added. |
| std::pair<bool, std::string> stmg::Util::strToBool | ( | const std::string & | sStr | ) |
Convert a string to boolean.
The string can be "t", "T", "true", "True", "TRUE", "y", "Y", "yes", "Yes", "YES" or "f", "F", "false", "False", "FALSE", "n", "N", "no", "No", "NO".
| sStr | The string. Cannot be empty. |
|
noexcept |
UTF8 string size in code points rather than bytes.
| sUtf8 | The UTF8 string. |
|
inlinenoexcept |
Unpacks a XY pair from an int64_t.
| nXY | The packed value. |
|
inlinenoexcept |
Unpacks a point (64 bit) from an int32_t.
| nXY | The packed value. |
|
inlinenoexcept |
Unpacks a point from an int64_t.
| nXY | The packed value. |
|
noexcept |
1.8.13