Changeset 76096 in vbox
- Timestamp:
- Dec 10, 2018 2:40:04 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r76095 r76096 3758 3758 # define RTUtf16Cat RT_MANGLER(RTUtf16Cat) 3759 3759 # define RTUtf16CatAscii RT_MANGLER(RTUtf16CatAscii) 3760 # define RTUtf16Chr RT_MANGLER(RTUtf16Chr) 3760 3761 # define RTUtf16End RT_MANGLER(RTUtf16End) 3761 3762 # define RTUtf16ICmpAscii RT_MANGLER(RTUtf16ICmpAscii) -
trunk/include/iprt/utf16.h
r70443 r76096 264 264 */ 265 265 RTDECL(PCRTUTF16) RTUtf16End(PCRTUTF16 pwszString, size_t cwcMax); 266 267 /** 268 * Finds a give UTF-16 character in a UTF-16 string. 269 * 270 * @returns Pointer to the first occurence of @a wc. 271 * @returns NULL if @a wc was not found. 272 * 273 * @param pwszString The string to search. 274 * @param wc The UTF-16 character to search for. 275 */ 276 RTDECL(PRTUTF16) RTUtf16Chr(PCRTUTF16 pwszString, RTUTF16 wc); 266 277 267 278 /** -
trunk/src/VBox/Runtime/Makefile.kmk
r76094 r76096 572 572 common/string/RTUtf16Cat.cpp \ 573 573 common/string/RTUtf16CatAscii.cpp \ 574 common/string/RTUtf16Chr.cpp \ 574 575 common/string/RTUtf16CmpAscii.cpp \ 575 576 common/string/RTUtf16ICmpAscii.cpp \ … … 3067 3068 RuntimeR0Drv_SOURCES.os2 = \ 3068 3069 common/path/RTPathFilenameUtf16.cpp \ 3070 common/string/RTUtf16Chr.cpp \ 3069 3071 common/string/memchr.asm \ 3070 3072 common/string/memcmp.asm \ -
trunk/src/VBox/Runtime/common/string/RTUtf16Chr.cpp
r76093 r76096 1 1 /* $Id$ */ 2 2 /** @file 3 * IPRT - RTUtf16 End.3 * IPRT - RTUtf16Chr. 4 4 */ 5 5 … … 33 33 34 34 35 RTDECL(P CRTUTF16) RTUtf16End(PCRTUTF16 pwszString, size_t cwcMax)35 RTDECL(PRTUTF16) RTUtf16Chr(PCRTUTF16 pwszString, RTUTF16 wc) 36 36 { 37 while (cwcMax-- > 0)37 for (;;) 38 38 { 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; 42 49 } 43 return NULL;44 50 } 45 RT_EXPORT_SYMBOL(RTUtf16 End);51 RT_EXPORT_SYMBOL(RTUtf16Chr); 46 52
Note:
See TracChangeset
for help on using the changeset viewer.