Skip to content
Snippets Groups Projects
Commit e5b76d66 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler Committed by Tobias Leibner
Browse files

whitespace

parent db3841cf
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ namespace Dune {
namespace XT {
namespace Common {
// forward, std::string variant needed in internal::convert_from_string
/**
......@@ -51,6 +52,7 @@ tokenize(const std::string& msg,
const std::string& separators,
const boost::algorithm::token_compress_mode_type mode = boost::algorithm::token_compress_off);
} // namespace Common
} // namespace XT
} // namespace Dune
......@@ -61,8 +63,10 @@ namespace Dune {
namespace XT {
namespace Common {
static constexpr const std::size_t default_to_string_precision = 6u;
/**
* \brief Reads an object from a string.
* \sa internal::convert_from_string for implementations
......@@ -78,6 +82,7 @@ static inline T from_string(std::string ss, const size_t size = 0, const size_t
return internal::convert_from_string<T>(ss, size, cols);
}
/**
* \brief Converts an object to string.
* \sa internal::convert_to_string for implementations
......@@ -131,6 +136,7 @@ std::string whitespaceify(const T& t, const char whitespace = ' ')
return ret;
} // ... whitespaceify(...)
template <class T>
inline std::vector<T>
tokenize(const std::string& msg, const std::string& separators, const boost::algorithm::token_compress_mode_type mode)
......@@ -145,6 +151,7 @@ tokenize(const std::string& msg, const std::string& separators, const boost::alg
return ret;
} // ... tokenize(...)
template <>
inline std::vector<std::string>
tokenize(const std::string& msg, const std::string& separators, const boost::algorithm::token_compress_mode_type mode)
......@@ -166,6 +173,7 @@ inline std::string stringFromTime(time_t cur_time = time(NULL))
return ctime(&cur_time);
}
//! helper struct for lexical cast
// see http://stackoverflow.com/a/2079728
template <typename ElemT>
......@@ -184,6 +192,7 @@ struct HexToString
}
};
static inline char** vector_to_main_args(const std::vector<std::string>& args)
{
char** argv = new char*[args.size()];
......@@ -194,6 +203,7 @@ static inline char** vector_to_main_args(const std::vector<std::string>& args)
return argv;
} // ... vector_to_main_args(...)
} // namespace Common
} // namespace XT
} // namespace Dune
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment