Sokoban
|
Namespace which contains utility functions which are used from more classes in the project. More...
Functions | |
void | split (const std::string &s, char separator, std::vector< std::string > &elems) |
Splits string according to the separator. More... | |
int | str_to_int (const std::string &str) |
Converts string to integer. More... | |
void | sec_to_string_stream (uint64_t sec, std::stringstream &ss) |
Converts seconds to hh:mm:ss format and writes it to a strigstream. More... | |
Namespace which contains utility functions which are used from more classes in the project.
|
inline |
Converts seconds to hh:mm:ss format and writes it to a strigstream.
sec | Seconds. |
ss | Reference to the stringstream which is function writes to. |
|
inline |
Splits string according to the separator.
s | Reference to the input string which is splitted. |
separator | Separator. |
elems | Reference to the list of string which represents parsed input. |
|
inline |
Converts string to integer.
If string is not convertible to int exception is thrown.
str | String which should be converted to int. |
std::invalid_argument | Number is out of range or string is not convertible to int. |