From 29c6d78edb88a38c2bfde54fc7ecccc691bbef30 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 16 Mar 2016 22:57:15 -0400 Subject: Added verbly submodule --- verbly/lib/util.h | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 verbly/lib/util.h (limited to 'verbly/lib/util.h') diff --git a/verbly/lib/util.h b/verbly/lib/util.h deleted file mode 100644 index 815b47c..0000000 --- a/verbly/lib/util.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef UTIL_H_15DDCA2D -#define UTIL_H_15DDCA2D - -#include -#include -#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 - Container split(std::string input, std::string delimiter) - { - Container result; - - while (!input.empty()) - { - int divider = input.find(" "); - if (divider == std::string::npos) - { - result.push_back(input); - - input = ""; - } else { - result.push_back(input.substr(0, divider)); - - input = input.substr(divider+1); - } - } - - return result; - } - -}; - -#endif /* end of include guard: UTIL_H_15DDCA2D */ -- cgit 1.4.1