Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/auxiliary')
-rw-r--r--src/auxiliary/functions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/auxiliary/functions.h b/src/auxiliary/functions.h
index 88af5c7..eff5143 100644
--- a/src/auxiliary/functions.h
+++ b/src/auxiliary/functions.h
@@ -23,6 +23,12 @@ inline const std::string plural(const std::string & word, size_t n) { return plu
const std::string article(const char * word);
inline const std::string article(const std::string & word) { return article(word.c_str()); }
+
+inline bool is_base_color_code(char const *c) { return ((*c == '^') && (*(c+1) >= '0') && (*(c+1) <= '9')); }
+
+inline bool is_core_color_code(char const *c) { return ((*c == '^') && (*(c+1) >= 'A') && (*(c+1) <= 'Z')); }
+
+inline bool is_color_code(char const *c) { return (is_base_color_code(c) || is_core_color_code(c)); }
}
#endif // __INCLUDED_AUX_FUNCTIONS_H__