VirtualBox

Changeset 103283 in vbox for trunk/src


Ignore:
Timestamp:
Feb 8, 2024 3:22:17 PM (12 months ago)
Author:
vboxsync
Message:

IPRT/string: Added RTStrCat2() as a convenient function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/string/RTStrCat.cpp

    r98103 r103283  
    4545
    4646
    47 RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc)
     47DECLINLINE(int) rtStrCat(char *pszDst, size_t cbDst, const char *pszSrc)
    4848{
    4949    char *pszDst2 = RTStrEnd(pszDst, cbDst);
     
    6565    return VERR_BUFFER_OVERFLOW;
    6666}
     67
     68RTDECL(int) RTStrCat(char *pszDst, size_t cbDst, const char *pszSrc)
     69{
     70    return rtStrCat(pszDst, cbDst, pszSrc);
     71}
    6772RT_EXPORT_SYMBOL(RTStrCat);
    6873
     74RTDECL(int) RTStrCat2(char *pszDst, size_t cbDst, const char *pszSrc)
     75{
     76    return RT_SUCCESS(rtStrCat(pszDst, cbDst, pszSrc)) ? pszDst : NULL;
     77}
     78RT_EXPORT_SYMBOL(RTStrCat2);
     79
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