-#include "Constants.h"\r
-\r
-#include <iostream>\r
-\r
-namespace Databoard {\r
-\r
- void printout(pANTLR3_BASE_TREE type)\r
- {\r
- std::cout << type->getText(type)->chars << " : " << type->getType(type) << std::endl;\r
- }\r
-\r
- std::string removeQuotes(std::string str)\r
- {\r
- if(str.length() > 0)\r
- {\r
- if(str.at(0) == '"')\r
- {\r
- str = str.substr(1, str.length()-1);\r
- }\r
- }\r
-\r
- if(str.length() > 0)\r
- {\r
- if(str.at(str.length()-1) == '"')\r
- {\r
- str = str.substr(0, str.length()-1);\r
- }\r
- }\r
-\r
- return str;\r
- }\r
-\r
- bool strEquals(const char* a, const char* b)\r
- {\r
- while(*a != '\0' && *b != '\0')\r
- {\r
- char c1 = *a;\r
- char c2 = *b;\r
-\r
- if(c1 >= 'a' && c1 <= 'z')\r
- {\r
- c1 += 'A'-'a';\r
- }\r
-\r
- if(c2 >= 'a' && c2 <= 'z')\r
- {\r
- c2 += 'A'-'a';\r
- }\r
-\r
- if(c1 != c2)\r
- {\r
- return false;\r
- }\r
-\r
- ++a;\r
- ++b;\r
- }\r
-\r
- if((*a == *b) && (*a == 0))\r
- {\r
- return true;\r
- }\r
- else\r
- {\r
- return false;\r
- }\r
- }\r
-}\r
+#include "Constants.h"
+
+#include <iostream>
+
+namespace Databoard {
+
+ void printout(pANTLR3_BASE_TREE type)
+ {
+ std::cout << type->getText(type)->chars << " : " << type->getType(type) << std::endl;
+ }
+
+ std::string removeQuotes(std::string str)
+ {
+ if(str.length() > 0)
+ {
+ if(str.at(0) == '"')
+ {
+ str = str.substr(1, str.length()-1);
+ }
+ }
+
+ if(str.length() > 0)
+ {
+ if(str.at(str.length()-1) == '"')
+ {
+ str = str.substr(0, str.length()-1);
+ }
+ }
+
+ return str;
+ }
+
+ bool strEquals(const char* a, const char* b)
+ {
+ while(*a != '\0' && *b != '\0')
+ {
+ char c1 = *a;
+ char c2 = *b;
+
+ if(c1 >= 'a' && c1 <= 'z')
+ {
+ c1 += 'A'-'a';
+ }
+
+ if(c2 >= 'a' && c2 <= 'z')
+ {
+ c2 += 'A'-'a';
+ }
+
+ if(c1 != c2)
+ {
+ return false;
+ }
+
+ ++a;
+ ++b;
+ }
+
+ if((*a == *b) && (*a == 0))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+}