about summary refs log tree commit diff stats
path: root/src/util.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-08-30 20:38:37 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-08-30 20:38:37 -0400
commita9d33aa08df10102539e33c0c6d4334e9e99a470 (patch)
tree6e6e4db4c6250b6a4720dc4e34907347e8dcddf5 /src/util.h
parente42d8636f3aa15e0ea8f723133914d6dba22009c (diff)
downloadlibtwittercpp-a9d33aa08df10102539e33c0c6d4334e9e99a470.tar.gz
libtwittercpp-a9d33aa08df10102539e33c0c6d4334e9e99a470.tar.bz2
libtwittercpp-a9d33aa08df10102539e33c0c6d4334e9e99a470.zip
Started using hkutil
As of this commit, the only change is using hatkirby::implode instead of the implode that was in util.cpp.
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};