VirtualBox

Changeset 33678 in vbox


Ignore:
Timestamp:
Nov 2, 2010 10:30:46 AM (14 years ago)
Author:
vboxsync
Message:

IPRT: Added RTStrCat and RTStrCatEx.

Location:
trunk
Files:
3 added
4 edited

Legend:

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

    r33540 r33678  
    20412041
    20422042/**
     2043 * String concatenation with overflow handling.
     2044 *
     2045 * @retval  VINF_SUCCESS on success.
     2046 * @retval  VERR_BUFFER_OVERFLOW if the destination buffer is too small.  The
     2047 *          buffer will contain as much of the string as it can hold, fully
     2048 *          terminated.
     2049 *
     2050 * @param   pszDst              The destination buffer.
     2051 * @param   cbDst               The size of the destination buffer (in bytes).
     2052 * @param   pszSrc              The source string.  NULL is not OK.
     2053 */
     2054RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc);
     2055
     2056/**
     2057 * String concatenation with overflow handling.
     2058 *
     2059 * @retval  VINF_SUCCESS on success.
     2060 * @retval  VERR_BUFFER_OVERFLOW if the destination buffer is too small.  The
     2061 *          buffer will contain as much of the string as it can hold, fully
     2062 *          terminated.
     2063 *
     2064 * @param   pszDst              The destination buffer.
     2065 * @param   cbDst               The size of the destination buffer (in bytes).
     2066 * @param   pszSrc              The source string.  NULL is not OK.
     2067 * @param   cchSrcMax           The maximum number of chars (not code points) to
     2068 *                              copy from the source string, not counting the
     2069 *                              terminator as usual.
     2070 */
     2071RTDECL(int) RTStrCatEx(char *pszDst, size_t cbDst, const char *pszSrc, size_t cchSrcMax);
     2072
     2073/**
    20432074 * Performs a case sensitive string compare between two UTF-8 strings.
    20442075 *
  • trunk/src/VBox/Runtime/Makefile.kmk

    r33602 r33678  
    312312        common/sort/RTSortApvIsSorted.cpp \
    313313        common/sort/shellsort.cpp \
     314        common/string/RTStrCat.cpp \
     315        common/string/RTStrCatEx.cpp \
    314316        common/string/RTStrCmp.cpp \
    315317        common/string/RTStrConvertHexBytes.cpp \
     
    962964        common/path/RTPathStripFilename.cpp \
    963965        common/path/RTPathStripTrailingSlash.cpp \
     966        common/string/RTStrCat.cpp \
     967        common/string/RTStrCatEx.cpp \
    964968        common/string/RTStrCmp.cpp \
    965969        common/string/RTStrCopy.cpp \
     
    12911295        common/string/strncmp.cpp \
    12921296        common/string/strpbrk.cpp \
     1297        common/string/RTStrCat.cpp \
     1298        common/string/RTStrCatEx.cpp \
    12931299        common/string/RTStrCopy.cpp \
    12941300        common/string/RTStrCopyEx.cpp \
     
    14261432        common/rand/randadv.cpp \
    14271433        common/rand/randparkmiller.cpp \
     1434        common/string/RTStrCat.cpp \
     1435        common/string/RTStrCatEx.cpp \
    14281436        common/string/RTStrCmp.cpp \
    14291437        common/string/RTStrCopy.cpp \
  • trunk/src/VBox/Runtime/common/string/RTStrCopyEx.cpp

    r30320 r33678  
    11/* $Id$ */
    22/** @file
    3  * IPRT - RTStrCopy.
     3 * IPRT - RTStrCopyEx.
    44 */
    55
  • trunk/src/VBox/Runtime/testcase/Makefile.kmk

    r33563 r33678  
    9797        tstRTStrAlloc \
    9898        tstRTStrCache \
     99        tstRTStrCatCopy \
    99100        tstRTStrFormat \
    100101        tstStrSimplePattern \
     
    428429tstRTStrCache_SOURCES = tstRTStrCache.cpp
    429430
     431tstRTStrCatCopy_TEMPLATE = VBOXR3TSTEXE
     432tstRTStrCatCopy_SOURCES = tstRTStrCatCopy.cpp
     433
     434tstRTStrFormat_TEMPLATE = VBOXR3TSTEXE
    430435tstRTStrFormat_SOURCES = tstRTStrFormat.cpp
    431436
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