VirtualBox

Changeset 18523 in vbox


Ignore:
Timestamp:
Mar 30, 2009 11:37:35 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45388
Message:

Runtime: typos

File:
1 edited

Legend:

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

    r18424 r18523  
    5050  /*
    5151   * Same case as with FreeBSD kernel:
    52    * The string.h stuff clashes with sys/systm.h
     52   * The string.h stuff clashes with sys/system.h
    5353   * ffs = find first set bit.
    5454   */
     
    193193 * @param   psz         The string.
    194194 * @param   cch         The max string length. Use RTSTR_MAX to process the entire string.
    195  * @param   fFlags      Teserved for future. Pass 0.
     195 * @param   fFlags      Reserved for future. Pass 0.
    196196 */
    197197RTDECL(int) RTStrValidateEncodingEx(const char *psz, size_t cch, uint32_t fFlags);
     
    254254 *                          If *ppusz is NULL or cCps is zero a buffer of at least cCps items
    255255 *                          will be allocated to hold the translated string.
    256  *                          If a buffer was requirest it must be freed using RTUtf16Free().
     256 *                          If a buffer was requested it must be freed using RTUtf16Free().
    257257 * @param   cCps            The number of code points in the unicode string. This includes the terminator.
    258258 * @param   pcCps           Where to store the length of the translated string. (Optional)
     
    269269 * strings will be rejected. The primary purpose of this function is to
    270270 * help allocate buffers for RTStrToUtf16Ex of the correct size. For most
    271  * other puroses RTStrCalcUtf16LenEx() should be used.
     271 * other purposes RTStrCalcUtf16LenEx() should be used.
    272272 *
    273273 * @returns Number of RTUTF16 items.
     
    313313 *                          If *ppwsz is NULL or cwc is zero a buffer of at least cwc items
    314314 *                          will be allocated to hold the translated string.
    315  *                          If a buffer was requirest it must be freed using RTUtf16Free().
     315 *                          If a buffer was requested it must be freed using RTUtf16Free().
    316316 * @param   cwc             The buffer size in RTUTF16s. This includes the terminator.
    317317 * @param   pcwc            Where to store the length of the translated string. (Optional)
     
    363363 * and return the pointer to the char following it.
    364364 *
    365  * This function will not consider anything at or following the the
     365 * This function will not consider anything at or following the
    366366 * buffer area pointed to by psz. It is therefore not suitable for
    367367 * inserting code points into a string, only appending/overwriting.
     
    370370 * @param   psz         The string.
    371371 * @param   CodePoint   The code point to write.
    372  *                      This sould not be RTUNICP_INVALID or any other charater
    373  *                      out of the UTF-8 range.
     372 *                      This should not be RTUNICP_INVALID or any other
     373 *                      character out of the UTF-8 range.
    374374 *
    375375 * @remark  This is a worker function for RTStrPutCp().
     
    461461 * and return the pointer to the char following it.
    462462 *
    463  * This function will not consider anything at or following the the
     463 * This function will not consider anything at or following the
    464464 * buffer area pointed to by psz. It is therefore not suitable for
    465465 * inserting code points into a string, only appending/overwriting.
     
    468468 * @param   psz         The string.
    469469 * @param   CodePoint   The code point to write.
    470  *                      This sould not be RTUNICP_INVALID or any other charater
    471  *                      out of the UTF-8 range.
     470 *                      This should not be RTUNICP_INVALID or any other
     471 *                      character out of the UTF-8 range.
    472472 *
    473473 * @remark  We optimize this operation by using an inline function for
     
    970970                                          size_t *poffPattern);
    971971
    972 
    973972/** @defgroup rt_str_conv   String To/From Number Conversions
    974973 * @ingroup grp_rt_str
     
    977976/**
    978977 * Converts a string representation of a number to a 64-bit unsigned number.
    979  *
    980  * @returns iprt status code.
    981  *          Warnings are used to indicate convertion problems.
    982  * @retval  VWRN_NUMBER_TOO_BIG
    983  * @retval  VWRN_NEGATIVE_UNSIGNED
    984  * @retval  VWRN_TRAILING_CHARS
    985  * @retval  VWRN_TRAILING_SPACES
    986  * @retval  VINF_SUCCESS
    987  * @retval  VERR_NO_DIGITS
    988  *
    989  * @param   pszValue    Pointer to the string value.
    990  * @param   ppszNext    Where to store the pointer to the first char following the number. (Optional)
    991  * @param   uBase       The base of the representation used.
    992  *                      If 0 the function will look for known prefixes before defaulting to 10.
    993  * @param   pu64        Where to store the converted number. (optional)
    994  */
    995 RTDECL(int) RTStrToUInt64Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint64_t *pu64);
    996 
    997 /**
    998  * Converts a string representation of a number to a 64-bit unsigned number,
    999  * making sure the full string is converted.
    1000  *
    1001  * @returns iprt status code.
    1002  *          Warnings are used to indicate convertion problems.
    1003  * @retval  VWRN_NUMBER_TOO_BIG
    1004  * @retval  VWRN_NEGATIVE_UNSIGNED
    1005  * @retval  VINF_SUCCESS
    1006  * @retval  VERR_NO_DIGITS
    1007  * @retval  VERR_TRAILING_SPACES
    1008  * @retval  VERR_TRAILING_CHARS
    1009  *
    1010  * @param   pszValue    Pointer to the string value.
    1011  * @param   uBase       The base of the representation used.
    1012  *                      If 0 the function will look for known prefixes before defaulting to 10.
    1013  * @param   pu64        Where to store the converted number. (optional)
    1014  */
    1015 RTDECL(int) RTStrToUInt64Full(const char *pszValue, unsigned uBase, uint64_t *pu64);
    1016 
    1017 /**
    1018  * Converts a string representation of a number to a 64-bit unsigned number.
    1019  * The base is guessed.
    1020  *
    1021  * @returns 64-bit unsigned number on success.
    1022  * @returns 0 on failure.
    1023  * @param   pszValue    Pointer to the string value.
    1024  */
    1025 RTDECL(uint64_t) RTStrToUInt64(const char *pszValue);
    1026 
    1027 /**
    1028  * Converts a string representation of a number to a 32-bit unsigned number.
    1029978 *
    1030979 * @returns iprt status code.
     
    1041990 * @param   uBase       The base of the representation used.
    1042991 *                      If 0 the function will look for known prefixes before defaulting to 10.
    1043  * @param   pu32        Where to store the converted number. (optional)
    1044  */
    1045 RTDECL(int) RTStrToUInt32Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint32_t *pu32);
    1046 
    1047 /**
    1048  * Converts a string representation of a number to a 32-bit unsigned number,
     992 * @param   pu64        Where to store the converted number. (optional)
     993 */
     994RTDECL(int) RTStrToUInt64Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint64_t *pu64);
     995
     996/**
     997 * Converts a string representation of a number to a 64-bit unsigned number,
    1049998 * making sure the full string is converted.
    1050999 *
    10511000 * @returns iprt status code.
    1052  *          Warnings are used to indicate convertion problems.
     1001 *          Warnings are used to indicate conversion problems.
    10531002 * @retval  VWRN_NUMBER_TOO_BIG
    10541003 * @retval  VWRN_NEGATIVE_UNSIGNED
     
    10611010 * @param   uBase       The base of the representation used.
    10621011 *                      If 0 the function will look for known prefixes before defaulting to 10.
    1063  * @param   pu32        Where to store the converted number. (optional)
    1064  */
    1065 RTDECL(int) RTStrToUInt32Full(const char *pszValue, unsigned uBase, uint32_t *pu32);
     1012 * @param   pu64        Where to store the converted number. (optional)
     1013 */
     1014RTDECL(int) RTStrToUInt64Full(const char *pszValue, unsigned uBase, uint64_t *pu64);
    10661015
    10671016/**
     
    10691018 * The base is guessed.
    10701019 *
    1071  * @returns 32-bit unsigned number on success.
     1020 * @returns 64-bit unsigned number on success.
    10721021 * @returns 0 on failure.
    10731022 * @param   pszValue    Pointer to the string value.
    10741023 */
    1075 RTDECL(uint32_t) RTStrToUInt32(const char *pszValue);
    1076 
    1077 /**
    1078  * Converts a string representation of a number to a 16-bit unsigned number.
     1024RTDECL(uint64_t) RTStrToUInt64(const char *pszValue);
     1025
     1026/**
     1027 * Converts a string representation of a number to a 32-bit unsigned number.
    10791028 *
    10801029 * @returns iprt status code.
     
    10911040 * @param   uBase       The base of the representation used.
    10921041 *                      If 0 the function will look for known prefixes before defaulting to 10.
    1093  * @param   pu16        Where to store the converted number. (optional)
    1094  */
    1095 RTDECL(int) RTStrToUInt16Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint16_t *pu16);
    1096 
    1097 /**
    1098  * Converts a string representation of a number to a 16-bit unsigned number,
     1042 * @param   pu32        Where to store the converted number. (optional)
     1043 */
     1044RTDECL(int) RTStrToUInt32Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint32_t *pu32);
     1045
     1046/**
     1047 * Converts a string representation of a number to a 32-bit unsigned number,
    10991048 * making sure the full string is converted.
    11001049 *
    11011050 * @returns iprt status code.
    1102  *          Warnings are used to indicate convertion problems.
     1051 *          Warnings are used to indicate conversion problems.
    11031052 * @retval  VWRN_NUMBER_TOO_BIG
    11041053 * @retval  VWRN_NEGATIVE_UNSIGNED
     
    11111060 * @param   uBase       The base of the representation used.
    11121061 *                      If 0 the function will look for known prefixes before defaulting to 10.
    1113  * @param   pu16        Where to store the converted number. (optional)
    1114  */
    1115 RTDECL(int) RTStrToUInt16Full(const char *pszValue, unsigned uBase, uint16_t *pu16);
     1062 * @param   pu32        Where to store the converted number. (optional)
     1063 */
     1064RTDECL(int) RTStrToUInt32Full(const char *pszValue, unsigned uBase, uint32_t *pu32);
     1065
     1066/**
     1067 * Converts a string representation of a number to a 64-bit unsigned number.
     1068 * The base is guessed.
     1069 *
     1070 * @returns 32-bit unsigned number on success.
     1071 * @returns 0 on failure.
     1072 * @param   pszValue    Pointer to the string value.
     1073 */
     1074RTDECL(uint32_t) RTStrToUInt32(const char *pszValue);
    11161075
    11171076/**
    11181077 * Converts a string representation of a number to a 16-bit unsigned number.
    1119  * The base is guessed.
    1120  *
    1121  * @returns 16-bit unsigned number on success.
    1122  * @returns 0 on failure.
    1123  * @param   pszValue    Pointer to the string value.
    1124  */
    1125 RTDECL(uint16_t) RTStrToUInt16(const char *pszValue);
    1126 
    1127 /**
    1128  * Converts a string representation of a number to a 8-bit unsigned number.
    11291078 *
    11301079 * @returns iprt status code.
     
    11411090 * @param   uBase       The base of the representation used.
    11421091 *                      If 0 the function will look for known prefixes before defaulting to 10.
    1143  * @param   pu8         Where to store the converted number. (optional)
    1144  */
    1145 RTDECL(int) RTStrToUInt8Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint8_t *pu8);
    1146 
    1147 /**
    1148  * Converts a string representation of a number to a 8-bit unsigned number,
     1092 * @param   pu16        Where to store the converted number. (optional)
     1093 */
     1094RTDECL(int) RTStrToUInt16Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint16_t *pu16);
     1095
     1096/**
     1097 * Converts a string representation of a number to a 16-bit unsigned number,
    11491098 * making sure the full string is converted.
    11501099 *
    11511100 * @returns iprt status code.
    1152  *          Warnings are used to indicate convertion problems.
     1101 *          Warnings are used to indicate conversion problems.
    11531102 * @retval  VWRN_NUMBER_TOO_BIG
    11541103 * @retval  VWRN_NEGATIVE_UNSIGNED
     
    11611110 * @param   uBase       The base of the representation used.
    11621111 *                      If 0 the function will look for known prefixes before defaulting to 10.
     1112 * @param   pu16        Where to store the converted number. (optional)
     1113 */
     1114RTDECL(int) RTStrToUInt16Full(const char *pszValue, unsigned uBase, uint16_t *pu16);
     1115
     1116/**
     1117 * Converts a string representation of a number to a 16-bit unsigned number.
     1118 * The base is guessed.
     1119 *
     1120 * @returns 16-bit unsigned number on success.
     1121 * @returns 0 on failure.
     1122 * @param   pszValue    Pointer to the string value.
     1123 */
     1124RTDECL(uint16_t) RTStrToUInt16(const char *pszValue);
     1125
     1126/**
     1127 * Converts a string representation of a number to a 8-bit unsigned number.
     1128 *
     1129 * @returns iprt status code.
     1130 *          Warnings are used to indicate conversion problems.
     1131 * @retval  VWRN_NUMBER_TOO_BIG
     1132 * @retval  VWRN_NEGATIVE_UNSIGNED
     1133 * @retval  VWRN_TRAILING_CHARS
     1134 * @retval  VWRN_TRAILING_SPACES
     1135 * @retval  VINF_SUCCESS
     1136 * @retval  VERR_NO_DIGITS
     1137 *
     1138 * @param   pszValue    Pointer to the string value.
     1139 * @param   ppszNext    Where to store the pointer to the first char following the number. (Optional)
     1140 * @param   uBase       The base of the representation used.
     1141 *                      If 0 the function will look for known prefixes before defaulting to 10.
     1142 * @param   pu8         Where to store the converted number. (optional)
     1143 */
     1144RTDECL(int) RTStrToUInt8Ex(const char *pszValue, char **ppszNext, unsigned uBase, uint8_t *pu8);
     1145
     1146/**
     1147 * Converts a string representation of a number to a 8-bit unsigned number,
     1148 * making sure the full string is converted.
     1149 *
     1150 * @returns iprt status code.
     1151 *          Warnings are used to indicate conversion problems.
     1152 * @retval  VWRN_NUMBER_TOO_BIG
     1153 * @retval  VWRN_NEGATIVE_UNSIGNED
     1154 * @retval  VINF_SUCCESS
     1155 * @retval  VERR_NO_DIGITS
     1156 * @retval  VERR_TRAILING_SPACES
     1157 * @retval  VERR_TRAILING_CHARS
     1158 *
     1159 * @param   pszValue    Pointer to the string value.
     1160 * @param   uBase       The base of the representation used.
     1161 *                      If 0 the function will look for known prefixes before defaulting to 10.
    11631162 * @param   pu8         Where to store the converted number. (optional)
    11641163 */
     
    11991198 *
    12001199 * @returns iprt status code.
    1201  *          Warnings are used to indicate convertion problems.
     1200 *          Warnings are used to indicate conversion problems.
    12021201 * @retval  VWRN_NUMBER_TOO_BIG
    12031202 * @retval  VINF_SUCCESS
     
    12471246 *
    12481247 * @returns iprt status code.
    1249  *          Warnings are used to indicate convertion problems.
     1248 *          Warnings are used to indicate conversion problems.
    12501249 * @retval  VWRN_NUMBER_TOO_BIG
    12511250 * @retval  VINF_SUCCESS
     
    12951294 *
    12961295 * @returns iprt status code.
    1297  *          Warnings are used to indicate convertion problems.
     1296 *          Warnings are used to indicate conversion problems.
    12981297 * @retval  VWRN_NUMBER_TOO_BIG
    12991298 * @retval  VINF_SUCCESS
     
    13431342 *
    13441343 * @returns iprt status code.
    1345  *          Warnings are used to indicate convertion problems.
     1344 *          Warnings are used to indicate conversion problems.
    13461345 * @retval  VWRN_NUMBER_TOO_BIG
    13471346 * @retval  VINF_SUCCESS
     
    14111410 *
    14121411 * @returns true on success.
    1413  * @returns false if the string collieded with an existing string.
     1412 * @returns false if the string collided with an existing string.
    14141413 * @param   pStrSpace       The space to insert it into.
    14151414 * @param   pStr            The string node.
     
    16191618 *                          If *ppsz is NULL or cch is zero a buffer of at least cch chars
    16201619 *                          will be allocated to hold the translated string.
    1621  *                          If a buffer was requirest it must be freed using RTUtf16Free().
     1620 *                          If a buffer was requested it must be freed using RTUtf16Free().
    16221621 * @param   cch             The buffer size in chars (the type). This includes the terminator.
    16231622 * @param   pcch            Where to store the length of the translated string. (Optional)
     
    16341633 * strings will be rejected. The primary purpose of this function is to
    16351634 * help allocate buffers for RTUtf16ToUtf8() of the correct size. For most
    1636  * other puroses RTUtf16ToUtf8Ex() should be used.
     1635 * other purposes RTUtf16ToUtf8Ex() should be used.
    16371636 *
    16381637 * @returns Number of char (bytes).
     
    16841683 * and return the pointer to the char following it.
    16851684 *
    1686  * This function will not consider anything at or following the the
     1685 * This function will not consider anything at or following the
    16871686 * buffer area pointed to by pwsz. It is therefore not suitable for
    16881687 * inserting code points into a string, only appending/overwriting.
     
    16911690 * @param   pwsz        The string.
    16921691 * @param   CodePoint   The code point to write.
    1693  *                      This sould not be RTUNICP_INVALID or any other charater
    1694  *                      out of the UTF-16 range.
     1692 *                      This should not be RTUNICP_INVALID or any other
     1693 *                      character out of the UTF-16 range.
    16951694 *
    16961695 * @remark  This is an internal worker for RTUtf16GetCpEx().
     
    17441743 * and return the pointer to the char following it.
    17451744 *
    1746  * This function will not consider anything at or following the the
     1745 * This function will not consider anything at or following the
    17471746 * buffer area pointed to by pwsz. It is therefore not suitable for
    17481747 * inserting code points into a string, only appending/overwriting.
     
    17511750 * @param   pwsz        The string.
    17521751 * @param   CodePoint   The code point to write.
    1753  *                      This sould not be RTUNICP_INVALID or any other charater
    1754  *                      out of the UTF-16 range.
     1752 *                      This should not be RTUNICP_INVALID or any other
     1753 *                      character out of the UTF-16 range.
    17551754 *
    17561755 * @remark  We optimize this operation by using an inline function for
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