From 06758e3dadb02a01b5ca65e4deef3075cf8c8a7e Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 28 Aug 2008 16:42:17 +0000 Subject: [PATCH] Added CharFilterNotWhitespace git-svn-id: svn://ultimatepp.org/upp/trunk@377 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/StrUtil.cpp | 5 +++++ uppsrc/Core/String.h | 1 + 2 files changed, 6 insertions(+) diff --git a/uppsrc/Core/StrUtil.cpp b/uppsrc/Core/StrUtil.cpp index e1db77291..81e29d611 100644 --- a/uppsrc/Core/StrUtil.cpp +++ b/uppsrc/Core/StrUtil.cpp @@ -58,6 +58,11 @@ int CharFilterWhitespace(int c) return IsSpace(c) ? c : 0; } +int CharFilterNotWhitespace(int c) +{ + return IsSpace(c) ? 0 : c; +} + int CharFilterAlpha(int c) { return IsAlpha(c) ? c : 0; diff --git a/uppsrc/Core/String.h b/uppsrc/Core/String.h index 78c23d028..f3e600302 100644 --- a/uppsrc/Core/String.h +++ b/uppsrc/Core/String.h @@ -771,6 +771,7 @@ int CharFilterAscii128(int c); int CharFilterUnicode(int c); int CharFilterDigit(int c); int CharFilterWhitespace(int c); +int CharFilterNotWhitespace(int c); int CharFilterAlpha(int c); int CharFilterAlphaToUpper(int c); int CharFilterAlphaToLower(int c);