#include <X11/Xatom.h>
+#include <assert.h>
+
#include <algorithm>
#include "Util.hh"
}
+bool Rect::contains(int __x, int __y) const {
+ return __x >= _x1 && __x <= _x2 &&
+ __y >= _y1 && __y <= _y2;
+}
+
+
string expandTilde(const string& s) {
if (s[0] != '~') return s;
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);
+}