aboutsummaryrefslogtreecommitdiff
path: root/common/util.h
diff options
context:
space:
mode:
authorMax Horn2012-02-20 16:03:39 +0100
committerMax Horn2012-02-20 16:18:27 +0100
commit4f8665fc836898ebf54fc73b1061125b748183bc (patch)
treeae393cd0822fab01bdcc38bd003ab186955eb270 /common/util.h
parent658080deeda79d20ea40643569fbcb072573e7cf (diff)
downloadscummvm-rg350-4f8665fc836898ebf54fc73b1061125b748183bc.tar.gz
scummvm-rg350-4f8665fc836898ebf54fc73b1061125b748183bc.tar.bz2
scummvm-rg350-4f8665fc836898ebf54fc73b1061125b748183bc.zip
COMMON: Move isFoo functions to namespace Common, add doxygen comments
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h75
1 files changed, 64 insertions, 11 deletions
diff --git a/common/util.h b/common/util.h
index 1df7bbb9c3..617bc3dcfa 100644
--- a/common/util.h
+++ b/common/util.h
@@ -34,17 +34,6 @@
((((size_t)value) & ((alignment) - 1)) == 0)
-//namespace{
-bool isAlnum(int c);
-bool isAlpha(int c);
-bool isDigit(int c);
-bool isNumber(int c);
-bool isLower(int c);
-bool isSpace(int c);
-bool isUpper(int c);
-//}
-
-
#ifdef MIN
#undef MIN
#endif
@@ -144,6 +133,70 @@ extern void hexdump(const byte * data, int len, int bytesPerLine = 16, int start
*/
bool parseBool(const String &val, bool &valAsBool);
+
+/**
+ * Test whether the given character is alphanumeric (a-z, A-Z, 0-9).
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is alphanumeric, false otherwise.
+ */
+bool isAlnum(int c);
+
+/**
+ * Test whether the given character is an alphabetic letter (a-z, A-Z).
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is TODO, false otherwise.
+ */
+bool isAlpha(int c);
+
+/**
+ * Test whether the given character is a decimal-digit (0-9).
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is a decimal-digit, false otherwise.
+ */
+bool isDigit(int c);
+
+/**
+ * Test whether the given character is a lower-case letter (a-z).
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is a lower-case letter, false otherwise.
+ */
+bool isLower(int c);
+
+/**
+ * Test whether the given character is a white-space.
+ * White-space characters are ' ', '\t', '\r', '\n', '\v', '\f'.
+ *
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is a white-space, false otherwise.
+ */
+bool isSpace(int c);
+
+/**
+ * Test whether the given character is an upper-case letter (A-Z).
+ * If the parameter is outside the range of a signed or unsigned char, then
+ * false is returned.
+ *
+ * @param c the character to test
+ * @return true if the character is an upper-case letter, false otherwise.
+ */
+bool isUpper(int c);
+
+
/**
* List of game language.
*/