VirtualBox

Changeset 50792 in vbox for trunk/include


Ignore:
Timestamp:
Mar 14, 2014 8:17:09 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92817
Message:

IPRT: Added RTUtf16ValidateEncodingEx, RTUtf16ValidateEncoding and RTUtf16IsValidEncoding.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r50790 r50792  
    17651765# define RTUtf16GetCpInternal                           RT_MANGLER(RTUtf16GetCpInternal)
    17661766# define RTUtf16ICmp                                    RT_MANGLER(RTUtf16ICmp)
     1767# define RTUtf16IsValidEncoding                         RT_MANGLER(RTUtf16IsValidEncoding)
    17671768# define RTUtf16Len                                     RT_MANGLER(RTUtf16Len)
    17681769# define RTUtf16LocaleICmp                              RT_MANGLER(RTUtf16LocaleICmp)
     
    17751776# define RTUtf16ToUtf8ExTag                             RT_MANGLER(RTUtf16ToUtf8ExTag)
    17761777# define RTUtf16ToUtf8Tag                               RT_MANGLER(RTUtf16ToUtf8Tag)
     1778# define RTUtf16ValidateEncoding                        RT_MANGLER(RTUtf16ValidateEncoding)
     1779# define RTUtf16ValidateEncodingEx                      RT_MANGLER(RTUtf16ValidateEncodingEx)
    17771780# define RTUuidClear                                    RT_MANGLER(RTUuidClear)
    17781781# define RTUuidCompare                                  RT_MANGLER(RTUuidCompare)
  • trunk/include/iprt/string.h

    r46010 r50792  
    672672RTDECL(int) RTStrValidateEncoding(const char *psz);
    673673
    674 /** @name Flags for RTStrValidateEncodingEx
     674/** @name Flags for RTStrValidateEncodingEx and RTUtf16ValidateEncodingEx
    675675 */
    676676/** Check that the string is zero terminated within the given size.
     
    685685 * @param   psz         The string.
    686686 * @param   cch         The max string length. Use RTSTR_MAX to process the entire string.
    687  * @param   fFlags      Reserved for future. Pass 0.
     687 * @param   fFlags      Combination of RTSTR_VALIDATE_ENCODING_XXX flags.
    688688 */
    689689RTDECL(int) RTStrValidateEncodingEx(const char *psz, size_t cch, uint32_t fFlags);
     
    33463346
    33473347/**
     3348 * Validates the UTF-16 encoding of the string.
     3349 *
     3350 * @returns iprt status code.
     3351 * @param   pwsz        The string.
     3352 */
     3353RTDECL(int) RTUtf16ValidateEncoding(PCRTUTF16 pwsz);
     3354
     3355/**
     3356 * Validates the UTF-16 encoding of the string.
     3357 *
     3358 * @returns iprt status code.
     3359 * @param   pwsz        The string.
     3360 * @param   cch         The max string length. Use RTSTR_MAX to process the entire string.
     3361 * @param   fFlags      Combination of RTSTR_VALIDATE_ENCODING_XXX flags.
     3362 */
     3363RTDECL(int) RTUtf16ValidateEncodingEx(PCRTUTF16 pwsz, size_t cwc, uint32_t fFlags);
     3364
     3365/**
     3366 * Checks if the UTF-16 encoding is valid.
     3367 *
     3368 * @returns true / false.
     3369 * @param   pwsz        The string.
     3370 */
     3371RTDECL(bool) RTUtf16IsValidEncoding(PCRTUTF16 pwsz);
     3372
     3373/**
    33483374 * Sanitise a (valid) UTF-16 string by replacing all characters outside a white
    33493375 * list in-place by an ASCII replacement character.  Multi-byte characters will
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