VirtualBox

Changeset 21721 in vbox


Ignore:
Timestamp:
Jul 20, 2009 11:06:31 AM (16 years ago)
Author:
vboxsync
Message:

iprt/string.h: doc corrections.

File:
1 edited

Legend:

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

    r21714 r21721  
    17071707
    17081708/**
    1709  * Translate a UTF-16 string into a Latin1 allocating the result buffer.
     1709 * Translate a UTF-16 string into a Latin-1 (ISO-8859-1) allocating the result
     1710 * buffer.
    17101711 *
    17111712 * @returns iprt status code.
     
    17181719
    17191720/**
    1720  * Translates UTF-16 to Latin1 using buffer provided by the caller or
    1721  * a fittingly sized buffer allocated by the function.
     1721 * Translates UTF-16 to Latin-1 (ISO-8859-1) using buffer provided by the caller
     1722 * or a fittingly sized buffer allocated by the function.
    17221723 *
    17231724 * @returns iprt status code.
    17241725 * @param   pwszString      The UTF-16 string to convert.
    1725  * @param   cwcString       The number of RTUTF16 items to translate from pwszString.
    1726  *                          The translation will stop when reaching cwcString or the terminator ('\\0').
    1727  *                          Use RTSTR_MAX to translate the entire string.
    1728  * @param   ppsz            If cch is non-zero, this must either be pointing to a pointer to
    1729  *                          a buffer of the specified size, or pointer to a NULL pointer.
    1730  *                          If *ppsz is NULL or cch is zero a buffer of at least cch chars
    1731  *                          will be allocated to hold the translated string.
    1732  *                          If a buffer was requested it must be freed using RTUtf16Free().
    1733  * @param   cch             The buffer size in chars (the type). This includes the terminator.
    1734  * @param   pcch            Where to store the length of the translated string. (Optional)
    1735  *                          This field will be updated even on failure, however the value is only
    1736  *                          specified for the following two error codes. On VERR_BUFFER_OVERFLOW
    1737  *                          and VERR_NO_STR_MEMORY it contains the required buffer space.
     1726 * @param   cwcString       The number of RTUTF16 items to translate from
     1727 *                          pwszString. The translation will stop when reaching
     1728 *                          cwcString or the terminator ('\\0'). Use RTSTR_MAX
     1729 *                          to translate the entire string.
     1730 * @param   ppsz            If cch is non-zero, this must either be pointing to
     1731 *                          a pointer to a buffer of the specified size, or
     1732 *                          pointer to a NULL pointer. If *ppsz is NULL or cch
     1733 *                          is zero a buffer of at least cch chars will be
     1734 *                          allocated to hold the translated string. If a buffer
     1735 *                          was requested it must be freed using RTUtf16Free().
     1736 * @param   cch             The buffer size in chars (the type). This includes
     1737 *                          the terminator.
     1738 * @param   pcch            Where to store the length of the translated string.
     1739 *                          (Optional)
     1740 *                          This will be set even on failure, however the value
     1741 *                          is only specified for the following two error
     1742 *                          codes. On VERR_BUFFER_OVERFLOW and
     1743 *                          VERR_NO_STR_MEMORY it contains the required buffer
     1744 *                          space.
    17381745 */
    17391746RTDECL(int)  RTUtf16ToLatin1Ex(PCRTUTF16 pwszString, size_t cwcString, char **ppsz, size_t cch, size_t *pcch);
    17401747
    17411748/**
    1742  * Calculates the length of the UTF-16 string in Latin1 chars (bytes).
     1749 * Calculates the length of the UTF-16 string in Latin-1 (ISO-8859-1) chars.
    17431750 *
    17441751 * This function will validate the string, and incorrectly encoded UTF-16
     
    17541761
    17551762/**
    1756  * Calculates the length of the UTF-16 string in Latin1 chars (bytes).
     1763 * Calculates the length of the UTF-16 string in Latin-1 (ISO-8859-1) chars.
    17571764 *
    17581765 * This function will validate the string, and incorrectly encoded UTF-16
     
    17611768 * @returns iprt status code.
    17621769 * @param   pwsz        The string.
    1763  * @param   cwc         The max string length. Use RTSTR_MAX to process the entire string.
     1770 * @param   cwc         The max string length. Use RTSTR_MAX to process the
     1771 *                      entire string.
    17641772 * @param   pcch        Where to store the string length (in bytes). Optional.
    17651773 *                      This is undefined on failure.
     
    17801788 * @returns iprt status code.
    17811789 * @param   psz         The string.
    1782  * @param   cch         The max string length. Use RTSTR_MAX to process the entire string.
     1790 * @param   cch         The max string length. Use RTSTR_MAX to process the
     1791 *                      entire string.
    17831792 * @param   pcwc        Where to store the string length. Optional.
    17841793 *                      This is undefined on failure.
     
    17871796
    17881797/**
    1789  * Translate a Latin1 string into a UTF-16 allocating the result buffer.
     1798 * Translate a Latin-1 (ISO-8859-1) string into a UTF-16 allocating the result
     1799 * buffer.
    17901800 *
    17911801 * @returns iprt status code.
    17921802 * @param   pszString       Latin1 string to convert.
    1793  * @param   ppwszString     Receives pointer to the allocated UTF-16 string.
    1794  *                          The returned string must be freed using
    1795  *                          RTUtf16Free().
     1803 * @param   ppwszString     Receives pointer to the allocated UTF-16 string. The
     1804 *                          returned string must be freed using RTUtf16Free().
    17961805 */
    17971806RTDECL(int) RTLatin1ToUtf16(const char *pszString, PRTUTF16 *ppwszString);
    17981807
    17991808/**
    1800  * Translates pszString from Latin1 to UTF-16, allocating the result buffer
    1801  * if requested.
     1809 * Translates pszString from Latin-1 (ISO-8859-1) to UTF-16, allocating the
     1810 * result buffer if requested.
    18021811 *
    18031812 * @returns iprt status code.
     
    18171826 *                          terminator.
    18181827 * @param   pcwc            Where to store the length of the translated
    1819  *                          string. (Optional)
    1820  *                          This field will be updated even on failure,
     1828 *                          string. (Optional) This will be set even on failure,
    18211829 *                          however the value is only specified for the
    18221830 *                          following two error codes. On VERR_BUFFER_OVERFLOW
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