OLD | NEW |
1 /* | 1 /* |
2 ********************************************************************** | 2 ********************************************************************** |
3 * Copyright (C) 1998-2012, International Business Machines | 3 * Copyright (C) 1998-2014, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ********************************************************************** | 5 ********************************************************************** |
6 * | 6 * |
7 * File ustring.h | 7 * File ustring.h |
8 * | 8 * |
9 * Modification History: | 9 * Modification History: |
10 * | 10 * |
11 * Date Name Description | 11 * Date Name Description |
12 * 12/07/98 bertrand Creation. | 12 * 12/07/98 bertrand Creation. |
13 ****************************************************************************** | 13 ****************************************************************************** |
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1304 U_STABLE UChar* U_EXPORT2 | 1304 U_STABLE UChar* U_EXPORT2 |
1305 u_strFromUTF8(UChar *dest, | 1305 u_strFromUTF8(UChar *dest, |
1306 int32_t destCapacity, | 1306 int32_t destCapacity, |
1307 int32_t *pDestLength, | 1307 int32_t *pDestLength, |
1308 const char *src, | 1308 const char *src, |
1309 int32_t srcLength, | 1309 int32_t srcLength, |
1310 UErrorCode *pErrorCode); | 1310 UErrorCode *pErrorCode); |
1311 | 1311 |
1312 /** | 1312 /** |
1313 * Convert a UTF-16 string to UTF-8. | 1313 * Convert a UTF-16 string to UTF-8. |
1314 * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error c
ode is set. | |
1315 * | 1314 * |
1316 * Same as u_strToUTF8() except for the additional subchar which is output for | 1315 * Same as u_strToUTF8() except for the additional subchar which is output for |
1317 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. | 1316 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. |
1318 * With subchar==U_SENTINEL, this function behaves exactly like u_strToUTF8(). | 1317 * With subchar==U_SENTINEL, this function behaves exactly like u_strToUTF8(). |
1319 * | 1318 * |
1320 * @param dest A buffer for the result string. The result will be zero-
terminated if | 1319 * @param dest A buffer for the result string. The result will be zero-
terminated if |
1321 * the buffer is large enough. | 1320 * the buffer is large enough. |
1322 * @param destCapacity The size of the buffer (number of chars). If it is 0, th
en | 1321 * @param destCapacity The size of the buffer (number of chars). If it is 0, th
en |
1323 * dest may be NULL and the function will only return the l
ength of the | 1322 * dest may be NULL and the function will only return the l
ength of the |
1324 * result without writing any of the result string (pre-fli
ghting). | 1323 * result without writing any of the result string (pre-fli
ghting). |
(...skipping 24 matching lines...) Expand all Loading... |
1349 u_strToUTF8WithSub(char *dest, | 1348 u_strToUTF8WithSub(char *dest, |
1350 int32_t destCapacity, | 1349 int32_t destCapacity, |
1351 int32_t *pDestLength, | 1350 int32_t *pDestLength, |
1352 const UChar *src, | 1351 const UChar *src, |
1353 int32_t srcLength, | 1352 int32_t srcLength, |
1354 UChar32 subchar, int32_t *pNumSubstitutions, | 1353 UChar32 subchar, int32_t *pNumSubstitutions, |
1355 UErrorCode *pErrorCode); | 1354 UErrorCode *pErrorCode); |
1356 | 1355 |
1357 /** | 1356 /** |
1358 * Convert a UTF-8 string to UTF-16. | 1357 * Convert a UTF-8 string to UTF-16. |
1359 * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error c
ode is set. | |
1360 * | 1358 * |
1361 * Same as u_strFromUTF8() except for the additional subchar which is output for | 1359 * Same as u_strFromUTF8() except for the additional subchar which is output for |
1362 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. | 1360 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. |
1363 * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF8(). | 1361 * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF8(). |
1364 * | 1362 * |
1365 * @param dest A buffer for the result string. The result will be zero-
terminated if | 1363 * @param dest A buffer for the result string. The result will be zero-
terminated if |
1366 * the buffer is large enough. | 1364 * the buffer is large enough. |
1367 * @param destCapacity The size of the buffer (number of UChars). If it is 0, t
hen | 1365 * @param destCapacity The size of the buffer (number of UChars). If it is 0, t
hen |
1368 * dest may be NULL and the function will only return the l
ength of the | 1366 * dest may be NULL and the function will only return the l
ength of the |
1369 * result without writing any of the result string (pre-fli
ghting). | 1367 * result without writing any of the result string (pre-fli
ghting). |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 U_STABLE UChar* U_EXPORT2 | 1512 U_STABLE UChar* U_EXPORT2 |
1515 u_strFromUTF32(UChar *dest, | 1513 u_strFromUTF32(UChar *dest, |
1516 int32_t destCapacity, | 1514 int32_t destCapacity, |
1517 int32_t *pDestLength, | 1515 int32_t *pDestLength, |
1518 const UChar32 *src, | 1516 const UChar32 *src, |
1519 int32_t srcLength, | 1517 int32_t srcLength, |
1520 UErrorCode *pErrorCode); | 1518 UErrorCode *pErrorCode); |
1521 | 1519 |
1522 /** | 1520 /** |
1523 * Convert a UTF-16 string to UTF-32. | 1521 * Convert a UTF-16 string to UTF-32. |
1524 * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error c
ode is set. | |
1525 * | 1522 * |
1526 * Same as u_strToUTF32() except for the additional subchar which is output for | 1523 * Same as u_strToUTF32() except for the additional subchar which is output for |
1527 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. | 1524 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. |
1528 * With subchar==U_SENTINEL, this function behaves exactly like u_strToUTF32(). | 1525 * With subchar==U_SENTINEL, this function behaves exactly like u_strToUTF32(). |
1529 * | 1526 * |
1530 * @param dest A buffer for the result string. The result will be zero-
terminated if | 1527 * @param dest A buffer for the result string. The result will be zero-
terminated if |
1531 * the buffer is large enough. | 1528 * the buffer is large enough. |
1532 * @param destCapacity The size of the buffer (number of UChar32s). If it is 0,
then | 1529 * @param destCapacity The size of the buffer (number of UChar32s). If it is 0,
then |
1533 * dest may be NULL and the function will only return the l
ength of the | 1530 * dest may be NULL and the function will only return the l
ength of the |
1534 * result without writing any of the result string (pre-fli
ghting). | 1531 * result without writing any of the result string (pre-fli
ghting). |
(...skipping 24 matching lines...) Expand all Loading... |
1559 u_strToUTF32WithSub(UChar32 *dest, | 1556 u_strToUTF32WithSub(UChar32 *dest, |
1560 int32_t destCapacity, | 1557 int32_t destCapacity, |
1561 int32_t *pDestLength, | 1558 int32_t *pDestLength, |
1562 const UChar *src, | 1559 const UChar *src, |
1563 int32_t srcLength, | 1560 int32_t srcLength, |
1564 UChar32 subchar, int32_t *pNumSubstitutions, | 1561 UChar32 subchar, int32_t *pNumSubstitutions, |
1565 UErrorCode *pErrorCode); | 1562 UErrorCode *pErrorCode); |
1566 | 1563 |
1567 /** | 1564 /** |
1568 * Convert a UTF-32 string to UTF-16. | 1565 * Convert a UTF-32 string to UTF-16. |
1569 * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error c
ode is set. | |
1570 * | 1566 * |
1571 * Same as u_strFromUTF32() except for the additional subchar which is output fo
r | 1567 * Same as u_strFromUTF32() except for the additional subchar which is output fo
r |
1572 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. | 1568 * illegal input sequences, instead of stopping with the U_INVALID_CHAR_FOUND er
ror code. |
1573 * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF32()
. | 1569 * With subchar==U_SENTINEL, this function behaves exactly like u_strFromUTF32()
. |
1574 * | 1570 * |
1575 * @param dest A buffer for the result string. The result will be zero-
terminated if | 1571 * @param dest A buffer for the result string. The result will be zero-
terminated if |
1576 * the buffer is large enough. | 1572 * the buffer is large enough. |
1577 * @param destCapacity The size of the buffer (number of UChars). If it is 0, t
hen | 1573 * @param destCapacity The size of the buffer (number of UChars). If it is 0, t
hen |
1578 * dest may be NULL and the function will only return the l
ength of the | 1574 * dest may be NULL and the function will only return the l
ength of the |
1579 * result without writing any of the result string (pre-fli
ghting). | 1575 * result without writing any of the result string (pre-fli
ghting). |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 u_strToJavaModifiedUTF8( | 1641 u_strToJavaModifiedUTF8( |
1646 char *dest, | 1642 char *dest, |
1647 int32_t destCapacity, | 1643 int32_t destCapacity, |
1648 int32_t *pDestLength, | 1644 int32_t *pDestLength, |
1649 const UChar *src, | 1645 const UChar *src, |
1650 int32_t srcLength, | 1646 int32_t srcLength, |
1651 UErrorCode *pErrorCode); | 1647 UErrorCode *pErrorCode); |
1652 | 1648 |
1653 /** | 1649 /** |
1654 * Convert a Java Modified UTF-8 string to a 16-bit Unicode string. | 1650 * Convert a Java Modified UTF-8 string to a 16-bit Unicode string. |
1655 * If the input string is not well-formed, then the U_INVALID_CHAR_FOUND error c
ode is set. | 1651 * If the input string is not well-formed and no substitution char is specified,
|
| 1652 * then the U_INVALID_CHAR_FOUND error code is set. |
1656 * | 1653 * |
1657 * This function behaves according to the documentation for Java DataInput.readU
TF() | 1654 * This function behaves according to the documentation for Java DataInput.readU
TF() |
1658 * except that it takes a length parameter rather than | 1655 * except that it takes a length parameter rather than |
1659 * interpreting the first two input bytes as the length. | 1656 * interpreting the first two input bytes as the length. |
1660 * See http://java.sun.com/javase/6/docs/api/java/io/DataInput.html#readUTF() | 1657 * See http://java.sun.com/javase/6/docs/api/java/io/DataInput.html#readUTF() |
1661 * | 1658 * |
1662 * The output string may not be well-formed UTF-16. | 1659 * The output string may not be well-formed UTF-16. |
1663 * | 1660 * |
1664 * @param dest A buffer for the result string. The result will be zero-
terminated if | 1661 * @param dest A buffer for the result string. The result will be zero-
terminated if |
1665 * the buffer is large enough. | 1662 * the buffer is large enough. |
(...skipping 28 matching lines...) Expand all Loading... |
1694 u_strFromJavaModifiedUTF8WithSub( | 1691 u_strFromJavaModifiedUTF8WithSub( |
1695 UChar *dest, | 1692 UChar *dest, |
1696 int32_t destCapacity, | 1693 int32_t destCapacity, |
1697 int32_t *pDestLength, | 1694 int32_t *pDestLength, |
1698 const char *src, | 1695 const char *src, |
1699 int32_t srcLength, | 1696 int32_t srcLength, |
1700 UChar32 subchar, int32_t *pNumSubstitutions, | 1697 UChar32 subchar, int32_t *pNumSubstitutions, |
1701 UErrorCode *pErrorCode); | 1698 UErrorCode *pErrorCode); |
1702 | 1699 |
1703 #endif | 1700 #endif |
OLD | NEW |