Oxygen Engine
Modern C++ 3D Engine using OpenGL
|
Functions | |
std::vector< std::string > | split (const std::string &input, const char separator) |
std::vector< std::string > | split (const std::string &input, const std::string &separator) |
bool | replace (std::string &str, const std::string &from, const std::string &to) |
std::string | bytesToStr (const ByteArray &input) |
ByteArray | strToBytes (const std::string &input) |
std::string | bytesToHex (const ByteArray &input, bool uppercase=false) |
ByteArray | hexToBytes (const std::string &input) |
const std::string | getBasename (const std::string &path, int show_parent_level=0) |
const std::string | sanitizeFilename (const std::string &filename, const char replace_invalid_to='_') |
const std::string | removeFileExtension (const std::string &filename) |
const std::string | removeFileExtension (const std::string &filename, std::string &extension) |
Various string utils
std::string oe::util::str::bytesToHex | ( | const ByteArray & | input, |
bool | uppercase = false |
||
) |
Convert byte data to an hexadecimal representation (e.g. to display hash functions results)
std::string oe::util::str::bytesToStr | ( | const ByteArray & | input | ) |
Convert byte data to string (note: might produce garbage characters when used with non-ASCII data)
ByteArray oe::util::str::hexToBytes | ( | const std::string & | input | ) |
Convert an hexadecimal representation to byte data
bool oe::util::str::replace | ( | std::string & | str, |
const std::string & | from, | ||
const std::string & | to | ||
) |
Replace all occurences of a string within a string
std::vector< std::string > oe::util::str::split | ( | const std::string & | input, |
const char | separator | ||
) |
Cut a string into pieces (uses a single char as separator)
std::vector< std::string > oe::util::str::split | ( | const std::string & | input, |
const std::string & | separator | ||
) |
Cut a string into pieces (uses a string as separator)
ByteArray oe::util::str::strToBytes | ( | const std::string & | input | ) |
Convert string to byte data