From 4ea281c750c5afcc68f2832bb42d98a1cbce6735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 16 Jul 2014 18:53:56 -0700 Subject: rename llmr => mbgl --- include/mbgl/util/string.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/mbgl/util/string.hpp (limited to 'include/mbgl/util/string.hpp') diff --git a/include/mbgl/util/string.hpp b/include/mbgl/util/string.hpp new file mode 100644 index 0000000000..f17d55cec3 --- /dev/null +++ b/include/mbgl/util/string.hpp @@ -0,0 +1,24 @@ +#ifndef MBGL_UTIL_STRING +#define MBGL_UTIL_STRING + +#include + +namespace mbgl { +namespace util { + +template +inline std::string sprintf(const char *msg, Args... args) { + char res[max]; + int len = snprintf(res, sizeof(res), msg, args...); + return std::string(res, len); +} + +template +inline std::string sprintf(const std::string &msg, Args... args) { + return sprintf(msg.c_str(), args...); +} + +} +} + +#endif -- cgit v1.2.1