diff options
Diffstat (limited to 'lib/util.h')
-rw-r--r-- | lib/util.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/util.h b/lib/util.h index 815b47c..fb5fe67 100644 --- a/lib/util.h +++ b/lib/util.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef UTIL_H_15DDCA2D | 1 | #ifndef UTIL_H_15DDCA2D |
2 | #define UTIL_H_15DDCA2D | 2 | #define UTIL_H_15DDCA2D |
3 | 3 | ||
4 | #include <string> | ||
5 | #include <iterator> | ||
6 | #include <sstream> | ||
7 | |||
8 | namespace verbly { | 4 | namespace verbly { |
9 | 5 | ||
10 | template <class InputIterator> | 6 | template <class InputIterator> |
@@ -32,7 +28,7 @@ namespace verbly { | |||
32 | 28 | ||
33 | while (!input.empty()) | 29 | while (!input.empty()) |
34 | { | 30 | { |
35 | int divider = input.find(" "); | 31 | int divider = input.find(delimiter); |
36 | if (divider == std::string::npos) | 32 | if (divider == std::string::npos) |
37 | { | 33 | { |
38 | result.push_back(input); | 34 | result.push_back(input); |
@@ -41,7 +37,7 @@ namespace verbly { | |||
41 | } else { | 37 | } else { |
42 | result.push_back(input.substr(0, divider)); | 38 | result.push_back(input.substr(0, divider)); |
43 | 39 | ||
44 | input = input.substr(divider+1); | 40 | input = input.substr(divider+delimiter.length()); |
45 | } | 41 | } |
46 | } | 42 | } |
47 | 43 | ||