summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-09 00:21:13 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-09 00:33:31 +0300
commitd9c62405db9a3f8bffaa5789bd63f59a65e29e3a (patch)
tree78c5417e3d2818f1844cd0a0730b6570eefbb9ef /src/utils
parent02215574dc2b24eeef9c4ab55776334856bfbaf5 (diff)
downloadmv-d9c62405db9a3f8bffaa5789bd63f59a65e29e3a.tar.gz
mv-d9c62405db9a3f8bffaa5789bd63f59a65e29e3a.tar.bz2
mv-d9c62405db9a3f8bffaa5789bd63f59a65e29e3a.tar.xz
mv-d9c62405db9a3f8bffaa5789bd63f59a65e29e3a.zip
improve messagein class.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/stringutils.cpp7
-rw-r--r--src/utils/stringutils.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index f1fd8d82b..bd95ec2d7 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -676,3 +676,10 @@ std::string decodeLinkText(std::string data)
{
return replaceAll(data, "\342\235\230", "|");
}
+
+std::string toStringPrint(const unsigned int val)
+{
+ static char str[100];
+ sprintf(str, "%u 0x%x", val, val);
+ return str;
+}
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 8b3ae0563..6aff503e2 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -79,6 +79,8 @@ template<typename T> std::string toString(const T &arg)
return ss.str();
}
+std::string toStringPrint(const unsigned int val);
+
/**
* Converts the given IP address to a string.
*