]> Dogcows Code - chaz/openbox/blobdiff - src/Util.cc
added "Hide Toolbar" option.
[chaz/openbox] / src / Util.cc
index 0300e52bb0ee279e66f3f0611bb3749ff49bc5c0..a97ffe50a591baa91a3ec11b54109c4e51a61dfb 100644 (file)
@@ -220,3 +220,24 @@ timeval normalizeTimeval(const timeval &tm) {
 
   return ret;
 }
+
+
+string itostring(unsigned long i) {
+  if (i == 0)
+    return string("0");
+  
+  string tmp;
+  for (; i > 0; i /= 10)
+    tmp.insert(tmp.begin(), "0123456789"[i%10]);
+  return tmp;
+}
+
+
+string itostring(long i) {
+  if (i < 0) {
+    std::string tmp = itostring( (unsigned long) -i);
+    tmp.insert(tmp.begin(), '-');
+    return tmp;
+  } else
+    return itostring( (unsigned long) i);
+}
This page took 0.02092 seconds and 4 git commands to generate.