Changeset 103444 in vbox
- Timestamp:
- Feb 19, 2024 1:58:17 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r103283 r103444 2266 2266 # define RTStrCalcUtf16LenEx RT_MANGLER(RTStrCalcUtf16LenEx) 2267 2267 # define RTStrCat RT_MANGLER(RTStrCat) 2268 # define RTStrCat2 RT_MANGLER(RTStrCat2)2269 2268 # define RTStrCatEx RT_MANGLER(RTStrCatEx) 2270 2269 # define RTStrCatP RT_MANGLER(RTStrCatP) … … 2274 2273 # define RTStrConvertHexBytesEx RT_MANGLER(RTStrConvertHexBytesEx) 2275 2274 # define RTStrCopy RT_MANGLER(RTStrCopy) 2276 # define RTStrCopy2 RT_MANGLER(RTStrCopy2)2277 2275 # define RTStrCopyEx RT_MANGLER(RTStrCopyEx) 2278 2276 # define RTStrCopyP RT_MANGLER(RTStrCopyP) -
trunk/include/iprt/string.h
r103283 r103444 2378 2378 * String copy with overflow handling. 2379 2379 * 2380 * @return Pointer to \a pszDst on success, or NULL on failure.2381 *2382 * @param pszDst The destination buffer.2383 * @param cbDst The size of the destination buffer (in bytes).2384 * @param pszSrc The source string. NULL is not OK.2385 */2386 RTDECL(char *) RTStrCopy2(char *pszDst, size_t cbDst, const char *pszSrc);2387 2388 /**2389 * String copy with overflow handling.2390 *2391 2380 * @retval VINF_SUCCESS on success. 2392 2381 * @retval VERR_BUFFER_OVERFLOW if the destination buffer is too small. The … … 2457 2446 */ 2458 2447 RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc); 2459 2460 /**2461 * String concatenation with overflow handling.2462 *2463 * @return Pointer to \a pszDst on success, or NULL on failure.2464 *2465 * @param pszDst The destination buffer.2466 * @param cbDst The size of the destination buffer (in bytes).2467 * @param pszSrc The source string. NULL is not OK.2468 */2469 RTDECL(char *) RTStrCat2(char *pszDst, size_t cbDst, const char *pszSrc);2470 2448 2471 2449 /** -
trunk/src/VBox/Runtime/common/string/RTStrCat.cpp
r103284 r103444 45 45 46 46 47 DECLINLINE(int) rtStrCat(char *pszDst, size_t cbDst, const char *pszSrc)47 RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc) 48 48 { 49 49 char *pszDst2 = RTStrEnd(pszDst, cbDst); … … 65 65 return VERR_BUFFER_OVERFLOW; 66 66 } 67 68 RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc)69 {70 return rtStrCat(pszDst, cbDst, pszSrc);71 }72 67 RT_EXPORT_SYMBOL(RTStrCat); 73 68 74 RTDECL(char *) RTStrCat2(char *pszDst, size_t cbDst, const char *pszSrc)75 {76 return RT_SUCCESS(rtStrCat(pszDst, cbDst, pszSrc)) ? pszDst : NULL;77 }78 RT_EXPORT_SYMBOL(RTStrCat2);79 -
trunk/src/VBox/Runtime/common/string/RTStrCopy.cpp
r103252 r103444 45 45 46 46 47 DECLINLINE(int) rtStrCopy(char *pszDst, size_t cbDst, const char *pszSrc)47 RTDECL(int) RTStrCopy(char *pszDst, size_t cbDst, const char *pszSrc) 48 48 { 49 49 size_t cchSrc = strlen(pszSrc); … … 61 61 return VERR_BUFFER_OVERFLOW; 62 62 } 63 64 RTDECL(int) RTStrCopy(char *pszDst, size_t cbDst, const char *pszSrc)65 {66 return rtStrCopy(pszDst, cbDst, pszSrc);67 }68 63 RT_EXPORT_SYMBOL(RTStrCopy); 69 64 70 RTDECL(char *) RTStrCopy2(char *pszDst, size_t cbDst, const char *pszSrc)71 {72 return RT_SUCCESS(rtStrCopy(pszDst, cbDst, pszSrc)) ? pszDst : NULL;73 }74 RT_EXPORT_SYMBOL(RTStrCopy2);75
Note:
See TracChangeset
for help on using the changeset viewer.