Namespace for classes/functionality not necessarily specific to game/opengl development.
More...
|
template<typename... Args> |
std::string | format (const std::string &fmt, Args &&... args) |
|
std::string | format_helper (std::string &sofar, const std::string &fmt) |
|
template<typename T , typename... Args> |
std::string | format_helper (std::string &sofar, const std::string &fmt, const T &arg0, Args &&... args) |
|
template<typename... Args> |
std::ostream & | print (const std::string &fmt, Args &&... args) |
|
template<typename... Args> |
std::ostream & | println (const std::string &fmt, Args &&... args) |
|
template<typename T , typename S , typename std::enable_if_t< can_check_equality< T, S >, void * > = nullptr> |
bool | operator== (const Option< T > &lhs, const S &rhs) |
|
template<typename T , typename S , typename std::enable_if_t< can_check_equality< T, S >, void * > = nullptr> |
bool | operator== (const Option< T > &lhs, const Option< S > &rhs) |
|
template<typename T , typename S , typename std::enable_if_t< can_check_equality< T, S >, void * > = nullptr> |
bool | operator== (const T &lhs, const Option< S > &rhs) |
|
template<typename T > |
Option< T > | make_some (const T &data) |
| Replacement for calling Option<T>::some()
|
|
template<typename T > |
Option< T > | make_none () |
| Replacement for calling Option<T>::none()
|
|
template<typename T , std::size_t = sizeof(T)> |
std::true_type | is_defined_impl (T *) |
|
std::false_type | is_defined_impl (...) |
|
bool | starts_with (crstring str, crstring prefix) |
| Checks if str starts with prefix.
|
|
bool | ends_with (crstring str, crstring suffix) |
| Checks if str ends with suffix.
|
|
std::string | replace_all (crstring str, crstring o, crstring n) |
| Replaces all occurences of o in str with n.
|
|
std::string | replace_all (crstring str, const std::vector< std::vector< std::string >> &os, const std::vector< std::string > &ns) |
| Replaces all occurences of any string in the ith element of os with the ith element of ns.
|
|
std::string | trim (crstring str, crstring back_trash=" \t\n\v\f\r\0", crstring front_trash=" \t\n\v\f\r\0") |
| Removes leading and trailing whitespace.
|
|
std::vector< std::string > | split (crstring str, char delim) |
| Splits a string into substrings separated by delim.
|
|
glm::vec2 | rotate (crvec2 pt, float angle) |
| Rotates a point (about the origin) by the given angle.
|
|
std::string | read_file (const std::string_view path) |
| Reads the contents of a file into a string.
|
|
std::size_t | hash_combine (std::size_t lhs, std::size_t rhs) |
| Stolen from Boost.
|
|
template<class T > |
std::string | to_string (const T &input, std::size_t precision=0) |
| converts input to a std::string
|
|
template<class T > |
bool | in_range (T val, T min, T max) |
| returns whether or not min <= val <= max
|
|
Namespace for classes/functionality not necessarily specific to game/opengl development.
Reexporting everything from utilities is dumb
- Todo:
- Figure out a nice sub-library solution and implement it