VirtualBox

Changeset 10106 in vbox for trunk/include


Ignore:
Timestamp:
Jul 2, 2008 1:40:07 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
32610
Message:

Added RTStrValidateEncoding, RTStrValidateEncodingEx and RTStrIsValidEncoding for explicit UTF-8 validation.

File:
1 edited

Legend:

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

    r8245 r10106  
    140140
    141141/**
     142 * Validates the UTF-8 encoding of the string.
     143 *
     144 * @returns iprt status code.
     145 * @param   psz         The string.
     146 */
     147RTDECL(int) RTStrValidateEncoding(const char *psz);
     148
     149/**
     150 * Validates the UTF-8 encoding of the string.
     151 *
     152 * @returns iprt status code.
     153 * @param   psz         The string.
     154 * @param   cch         The max string length. Use RTSTR_MAX to process the entire string.
     155 * @param   fFlags      Teserved for future. Pass 0.
     156 */
     157RTDECL(int) RTStrValidateEncodingEx(const char *psz, size_t cch, unsigned fFlags);
     158
     159/**
     160 * Checks if the UTF-8 encoding is valid.
     161 *
     162 * @returns true / false.
     163 * @param   psz         The string.
     164 */
     165RTDECL(bool) RTStrIsValidEncoding(const char *psz);
     166
     167/**
    142168 * Gets the number of code points the string is made up of, excluding
    143169 * the terminator.
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