summaryrefslogtreecommitdiff
path: root/runtime/libs/misc/include/misc/string_helpers.h
diff options
context:
space:
mode:
authorChunseok Lee <chunseok.lee@samsung.com>2020-07-30 11:32:26 +0900
committerChunseok Lee <chunseok.lee@samsung.com>2020-07-30 11:32:26 +0900
commit05e0ec30a632339a8533082476f27bda31ccde16 (patch)
tree5f220ac83084fe133ffb08a6a17e99f9bb36ec1c /runtime/libs/misc/include/misc/string_helpers.h
parente2ef8438a24f7c56a0744eb579a6e293ee2fbf8e (diff)
downloadnnfw-05e0ec30a632339a8533082476f27bda31ccde16.tar.gz
nnfw-05e0ec30a632339a8533082476f27bda31ccde16.tar.bz2
nnfw-05e0ec30a632339a8533082476f27bda31ccde16.zip
Imported Upstream version 1.7.0upstream/1.7.0
Diffstat (limited to 'runtime/libs/misc/include/misc/string_helpers.h')
-rw-r--r--runtime/libs/misc/include/misc/string_helpers.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/libs/misc/include/misc/string_helpers.h b/runtime/libs/misc/include/misc/string_helpers.h
index 6aac3a83b..46fecca71 100644
--- a/runtime/libs/misc/include/misc/string_helpers.h
+++ b/runtime/libs/misc/include/misc/string_helpers.h
@@ -62,5 +62,20 @@ template <typename... Args> std::string str(Args &&... args)
return ss.str();
}
+template <typename InputIt> std::string join(InputIt first, InputIt last, const std::string &concat)
+{
+ std::string ret;
+ if (first == last)
+ return ret;
+
+ ret += *first;
+ for (++first; first != last; ++first)
+ {
+ ret += concat;
+ ret += *first;
+ }
+ return ret;
+}
+
} // namespace misc
} // namespace nnfw