diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
---|---|---|
committer | <> | 2014-05-08 15:03:54 +0000 |
commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /include/iprt/uni.h | |
parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
download | VirtualBox-master.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'include/iprt/uni.h')
-rw-r--r-- | include/iprt/uni.h | 32 |
1 files changed, 30 insertions, 2 deletions
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 @@ -161,6 +161,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. * * @returns true if it is. @@ -303,6 +317,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. * * @returns true if it is. |