From 7e85b35d7d1714e3f85434b891a1050ad584e337 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 13 Apr 2016 11:24:24 -0400 Subject: Added ability to upload media and tweet it Images (static and animated) and videos have been tested. Currently all media uploads occur in one large chunk; support to break down chunks will be added later. --- src/util.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/util.h (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h new file mode 100644 index 0000000..e1c9370 --- /dev/null +++ b/src/util.h @@ -0,0 +1,29 @@ +#ifndef UTIL_H_440DEAA0 +#define UTIL_H_440DEAA0 + +#include +#include + +namespace twitter { + + 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(); + } + +}; + +#endif /* end of include guard: UTIL_H_440DEAA0 */ -- cgit 1.4.1