summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools.c b/tools.c
index 555ba29..18adeba 100644
--- a/tools.c
+++ b/tools.c
@@ -1,6 +1,7 @@
#include <string>
#include <vector>
#include <sstream>
+#include <algorithm>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@@ -53,6 +54,20 @@ std::string StrToLowerCase(std::string str) {
}
/****************************************************************************************
+* GetDirectoryFromTimer
+****************************************************************************************/
+std::string GetDirectoryFromTimer(std::string file) {
+ std::string dir = "";
+ size_t found = file.find_last_of('~');
+ if (found != std::string::npos) {
+ dir = file.substr(0, found);
+ std::replace(dir.begin(), dir.end(), '~', '/');
+ }
+ return dir;
+}
+
+
+/****************************************************************************************
* DrawRoundedCorners
****************************************************************************************/
void DrawRoundedCorners(cPixmap *p, int posX, int posY, int width, int height, int radius, int borderWidth, tColor borderColor) {