VirtualBox

Changeset 67674 in vbox for trunk/include/iprt/cpp


Ignore:
Timestamp:
Jun 28, 2017 10:26:10 PM (8 years ago)
Author:
vboxsync
Message:

RTCString: Added append methods for appending a substring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cpp/ministring.h

    r67651 r67674  
    369369
    370370    /**
    371      * Appends the string @a that to @a this.
     371     * Appends the string @a pszThat to @a this.
    372372     *
    373373     * @param   pszThat         The C string to append.
     
    378378     */
    379379    RTCString &append(const char *pszThat);
     380
     381    /**
     382     * Appends the a substring from @a rThat to @a this.
     383     *
     384     * @param   pszThat         The C string to append.
     385     * @param   offStart        The start of the substring to append (byte offset,
     386     *                          not codepoint).
     387     * @param   cchMax          The maximum number of bytes to append.
     388     *
     389     * @throws  std::bad_alloc  On allocation error.  The object is left unchanged.
     390     *
     391     * @returns Reference to the object.
     392     */
     393    RTCString &append(const RTCString &rThat, size_t offStart, size_t cchMax = RTSTR_MAX);
     394
     395    /**
     396     * Appends the first @a cchMax chars from string @a pszThat to @a this.
     397     *
     398     * @param   pszThat         The C string to append.
     399     * @param   cchMax          The maximum number of bytes to append.
     400     *
     401     * @throws  std::bad_alloc  On allocation error.  The object is left unchanged.
     402     *
     403     * @returns Reference to the object.
     404     */
     405    RTCString &append(const char *pszThat, size_t cchMax);
    380406
    381407    /**
     
    10371063    }
    10381064
     1065    /**
     1066     * Appends exactly @a cchSrc chars from @a pszSrc to @a this.
     1067     *
     1068     * This is an internal worker for the append() methods.
     1069     *
     1070     * @param   pszSrc          The source string.
     1071     * @param   cchSrc          The source string length (exact).
     1072     * @throws  std::bad_alloc  On allocation error.  The object is left unchanged.
     1073     *
     1074     * @returns Reference to the object.
     1075     */
     1076    RTCString &appendWorker(const char *pszSrc, size_t cchSrc);
     1077
    10391078    static DECLCALLBACK(size_t) printfOutputCallback(void *pvArg, const char *pachChars, size_t cbChars);
    10401079
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