From fb123f93f9f5ce42c8e5785d2f8e0edaf951740e Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Wed, 26 Mar 2014 19:21:20 +0000 Subject: Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2. --- include/iprt/uni.h | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'include/iprt/uni.h') diff --git a/include/iprt/uni.h b/include/iprt/uni.h index 6f0c23ec..a1161db1 100644 --- a/include/iprt/uni.h +++ b/include/iprt/uni.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2010 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -46,8 +46,8 @@ RT_C_DECLS_BEGIN - #ifndef RTUNI_USE_WCTYPE + /** * A unicode flags range. * @internal @@ -160,6 +160,20 @@ DECLINLINE(bool) RTUniCpIsLower(RTUNICP CodePoint) } +/** + * Checks if a unicode code point is case foldable. + * + * @returns true if it is. + * @returns false if it isn't. + * @param CodePoint The code point. + */ +DECLINLINE(bool) RTUniCpIsFoldable(RTUNICP CodePoint) +{ + /* Right enough. */ + return (rtUniCpFlags(CodePoint) & (RTUNI_LOWER | RTUNI_UPPER)) != 0; +} + + /** * Checks if a unicode code point is alphabetic. * @@ -302,6 +316,20 @@ DECLINLINE(bool) RTUniCpIsLower(RTUNICP CodePoint) } +/** + * Checks if a unicode code point is case foldable. + * + * @returns true if it is. + * @returns false if it isn't. + * @param CodePoint The code point. + */ +DECLINLINE(bool) RTUniCpIsFoldable(RTUNICP CodePoint) +{ + /* Right enough. */ + return iswupper(CodePoint) || iswlower(CodePoint); +} + + /** * Checks if a unicode code point is alphabetic. * -- cgit v1.2.1