|
static std::vector< uint8_t > | Base64DecodedStringToBytes (std::string_view str) |
|
static std::vector< uint32_t > | BytesToUnsignedInts (const std::vector< uint8_t > &bytes) |
|
static bool | Equal (float a, float b, float precision=8192.f) |
|
static std::vector< std::string > | SplitString (const std::string &s, char delim) |
|
|
template<typename Out > |
static void | split (const std::string &s, char delim, Out result) |
|
◆ Base64DecodedStringToBytes()
std::vector< uint8_t > tson::Tools::Base64DecodedStringToBytes |
( |
std::string_view |
str | ) |
|
|
inlinestatic |
When you have decoded a Base64 string, you'll get a string representing bytes. This function turns them into actual bytes.
- Parameters
-
- Returns
◆ BytesToUnsignedInts()
std::vector< uint32_t > tson::Tools::BytesToUnsignedInts |
( |
const std::vector< uint8_t > & |
bytes | ) |
|
|
inlinestatic |
Converts bytes into unsigned int values. The bytes are converted in the Little Endian byte order to fit Tiled's specs.
- Parameters
-
- Returns
- Bytes converted to unsigned ints
◆ Equal()
bool tson::Tools::Equal |
( |
float |
a, |
|
|
float |
b, |
|
|
float |
precision = 8192.f |
|
) |
| |
|
inlinestatic |
Uses a threshold for comparing floats, as they are not precise in many cases.
- Parameters
-
- Returns
- true if equal based on the currently defined precision
The documentation for this class was generated from the following file: