VirtualBox

Changeset 46011 in vbox for trunk/include


Ignore:
Timestamp:
May 13, 2013 11:28:28 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85674
Message:

iprt/string.h: Added RTStrIsCaseFoldable, RTStrIsUpperCased and RTStrIsLowerCased.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/uni.h

    r44528 r46011  
    4747
    4848
    49 
    5049#ifndef RTUNI_USE_WCTYPE
     50
    5151/**
    5252 * A unicode flags range.
     
    162162
    163163/**
     164 * Checks if a unicode code point is case foldable.
     165 *
     166 * @returns true if it is.
     167 * @returns false if it isn't.
     168 * @param   CodePoint       The code point.
     169 */
     170DECLINLINE(bool) RTUniCpIsFoldable(RTUNICP CodePoint)
     171{
     172    /* Right enough. */
     173    return (rtUniCpFlags(CodePoint) & (RTUNI_LOWER | RTUNI_UPPER)) != 0;
     174}
     175
     176
     177/**
    164178 * Checks if a unicode code point is alphabetic.
    165179 *
     
    304318
    305319/**
     320 * Checks if a unicode code point is case foldable.
     321 *
     322 * @returns true if it is.
     323 * @returns false if it isn't.
     324 * @param   CodePoint       The code point.
     325 */
     326DECLINLINE(bool) RTUniCpIsFoldable(RTUNICP CodePoint)
     327{
     328    /* Right enough. */
     329    return iswupper(CodePoint) || iswlower(CodePoint);
     330}
     331
     332
     333/**
    306334 * Checks if a unicode code point is alphabetic.
    307335 *
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette