Skip to content
Snippets Groups Projects
Commit 7164aeb5 authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

[ConfigParser] Make it work with strings containing spaces.

[[Imported from SVN: r6028]]
parent 1a473614
No related branches found
No related tags found
No related merge requests found
......@@ -348,6 +348,19 @@ namespace Dune {
}
};
// "How do I convert a string into a wstring in C++?" "Why, that very simple
// son. You just need a these hundred lines of code."
// Instead im gonna restrict myself to string with charT=char here
template<typename traits, typename Allocator>
struct ConfigParser::Parser<std::basic_string<char, traits, Allocator> > {
static std::basic_string<char, traits, Allocator>
parse(const std::string& str) {
std::string trimmed = ltrim(rtrim(str));
return std::basic_string<char, traits, Allocator>(trimmed.begin(),
trimmed.end());
}
};
template<typename T, int n>
struct ConfigParser::Parser<FieldVector<T, n> > {
static FieldVector<T, n>
......
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