about summary refs log tree commit diff stats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/util.h b/src/util.h index b950728..8b9cf86 100644 --- a/src/util.h +++ b/src/util.h
@@ -1,31 +1,10 @@
1#ifndef UTIL_H_440DEAA0 1#ifndef UTIL_H_440DEAA0
2#define UTIL_H_440DEAA0 2#define UTIL_H_440DEAA0
3 3
4#include <string>
5#include <sstream>
6#include <memory>
7#include <ctime> 4#include <ctime>
8 5
9namespace twitter { 6namespace twitter {
10 7
11 template <class InputIterator>
12 std::string implode(InputIterator first, InputIterator last, std::string delimiter)
13 {
14 std::stringstream result;
15
16 for (InputIterator it = first; it != last; it++)
17 {
18 if (it != first)
19 {
20 result << delimiter;
21 }
22
23 result << *it;
24 }
25
26 return result.str();
27 }
28
29 time_t timegm(struct tm * t); 8 time_t timegm(struct tm * t);
30 9
31}; 10};