From e1fa4a088dd95caef22045f905a9d5d22b71bef0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Tue, 24 Jan 2017 21:50:39 -0500 Subject: Whitespace changes --- lib/util.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/util.h') diff --git a/lib/util.h b/lib/util.h index b74b050..9db8678 100644 --- a/lib/util.h +++ b/lib/util.h @@ -6,25 +6,25 @@ #include namespace verbly { - + template std::string implode(InputIterator first, InputIterator last, std::string delimiter) { std::stringstream result; - + for (InputIterator it = first; it != last; it++) { if (it != first) { result << delimiter; } - + result << *it; } - + return result.str(); } - + template void split(std::string input, std::string delimiter, OutputIterator out) { @@ -35,27 +35,27 @@ namespace verbly { { *out = input; out++; - + input = ""; } else { *out = input.substr(0, divider); out++; - + input = input.substr(divider+delimiter.length()); } } } - + template Container split(std::string input, std::string delimiter) { Container result; - + split(input, delimiter, std::back_inserter(result)); - + return result; } - + }; #endif /* end of include guard: UTIL_H_15DDCA2D */ -- cgit 1.4.1