VirtualBox

Ignore:
Timestamp:
Dec 10, 2018 2:40:04 AM (6 years ago)
Author:
vboxsync
Message:

IPRT: Added RTUtf16Chr.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/RTUtf16Chr.cpp

    r76093 r76096  
    11/* $Id$ */
    22/** @file
    3  * IPRT - RTUtf16End.
     3 * IPRT - RTUtf16Chr.
    44 */
    55
     
    3333
    3434
    35 RTDECL(PCRTUTF16) RTUtf16End(PCRTUTF16 pwszString, size_t cwcMax)
     35RTDECL(PRTUTF16) RTUtf16Chr(PCRTUTF16 pwszString, RTUTF16 wc)
    3636{
    37     while (cwcMax-- > 0)
     37    for (;;)
    3838    {
    39         if (!*pwszString)
    40             return pwszString;
    41         pwszString++;
     39        RTUTF16 wcSrc = *pwszString;
     40        if (wcSrc != wc)
     41        {
     42            if (wcSrc != '\0')
     43                pwszString++;
     44            else
     45                return NULL;
     46        }
     47        else
     48            return (PRTUTF16)pwszString;
    4249    }
    43     return NULL;
    4450}
    45 RT_EXPORT_SYMBOL(RTUtf16End);
     51RT_EXPORT_SYMBOL(RTUtf16Chr);
    4652
Note: See TracChangeset for help on using the changeset viewer.

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