aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Utilities/Util.h
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-07-21 12:13:23 -0600
committerBrian <runningnak3d@gmail.com>2010-07-21 12:13:23 -0600
commit4320b1090166f05ee888400a6975b7288a86cba8 (patch)
tree698bf6ebfbb905043e6f2d0c253d5899e28ee7ea /src/server/shared/Utilities/Util.h
parent5995a8ec1d356cba24a62661616c04a058c251a2 (diff)
* Implement the ability to delete characters without them being removed from
* the DB, so they can be unerased * Original patch by DasBlub * Ported to Trinty by Az@zel --HG-- branch : trunk
Diffstat (limited to 'src/server/shared/Utilities/Util.h')
-rw-r--r--src/server/shared/Utilities/Util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h
index 4f997725d25..68886bb0d42 100644
--- a/src/server/shared/Utilities/Util.h
+++ b/src/server/shared/Utilities/Util.h
@@ -182,6 +182,15 @@ inline bool isNumeric(char c)
return (c >= '0' && c <='9');
}
+inline bool isNumeric(char const* str)
+{
+ for (char const* c = str; *c; ++c)
+ if (!isNumeric(*c))
+ return false;
+
+ return true;
+}
+
inline bool isNumericOrSpace(wchar_t wchar)
{
return isNumeric(wchar) || wchar == L' ';