+/* {SECRET} */
+/****************************************************************************
+REMARKS:
+tells if a character is a letter.
+replace this when wxWindows gets regex library. (without strange licensing
+restrictions)
+****************************************************************************/
+bool IsLetter(
+ char c, bool acceptspace = false)
+{
+ if (acceptspace && (c == ' ')) return true;
+ if (c >= '0' && c <= '9') return true;
+ return ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == '\"' || c == '\'' );
+}
+
+#define IsQuote(c) (c == '\'' || c == '\"')
+
+/* {SECRET} */
+/****************************************************************************
+REMARKS:
+tells if a character is a letter.
+replace this when wxWindows gets regex library. (without strange licensing
+restrictions)
+****************************************************************************/
+wxString GetEquals(
+ wxString var,
+ wxString value)
+{
+ if (!wxEchoVariable::Exists(var)) {
+ // TODO: when we implement the set variable, check for a set variable as well
+ #ifdef CHECKED
+ wxMessageBox(wxString("wxHTML #if\\else error: Variable ") + var + wxString(" not found."),"Error",wxICON_ERROR);
+ #endif
+ return wxString("0"); // false
+ }
+
+ wxString tmp = wxEchoVariable::GetValue(var);
+
+ if (IsQuote( value.GetChar(0) ))
+ value = value.Mid(1);
+ if (IsQuote(value.GetChar(value.Length()-1)))
+ value = value.Mid(0,value.Length()-1);
+
+ if (tmp.CmpNoCase(value) == 0) return wxString("1");
+ return wxString("0");
+}
+