Assignment Search Framework
|
Go to the source code of this file.
Functions | |
std::string | int_to_string (int i) |
std::string | double_to_string (double d) |
void | split (const std::string &s, std::vector< std::string > &tokens, char delim) |
template<class T > | |
std::string | vec_to_string (const std::vector< T > &vec) |
Utilities for string manipulation.
std::string double_to_string | ( | double | d | ) |
Converts the given double to a string.
d | The double to convert. |
std::string int_to_string | ( | int | i | ) |
Converts the given integer to a string.
i | The integer to convert. |
void split | ( | const std::string & | s, |
std::vector< std::string > & | tokens, | ||
char | delim | ||
) |
Splits the given string according into different tokens according to the given delimiter, and appends them to the given list.
s | The string to split. |
tokens | The list of tokens to store the split in. |
delim | The delimiter. |
std::string vec_to_string | ( | const std::vector< T > & | vec | ) |
Returns a string representation of the given vector.
Assumes that the "<<" operator can be applied to the vector elements.
vec | A vector of elements. |