From 4320b1090166f05ee888400a6975b7288a86cba8 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 21 Jul 2010 12:13:23 -0600 Subject: * 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 --- src/server/shared/Utilities/Util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/server/shared/Utilities/Util.h') 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' '; -- cgit v1.2.3