VirtualBox

Changeset 24427 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Nov 6, 2009 8:52:12 AM (15 years ago)
Author:
vboxsync
Message:

iprt/string.h: Added a simpler allocating sprintf interface.

File:
1 edited

Legend:

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

    r21337 r24427  
    194194RT_EXPORT_SYMBOL(RTStrAPrintf);
    195195
     196
     197RTDECL(char *) RTStrAPrintf2V(const char *pszFormat, va_list args)
     198{
     199    char *pszBuffer;
     200    RTStrAPrintfV(&pszBuffer, pszFormat, args);
     201    return pszBuffer;
     202}
     203RT_EXPORT_SYMBOL(RTStrAPrintf2V);
     204
     205
     206RTDECL(char *) RTStrAPrintf2(const char *pszFormat, ...)
     207{
     208    va_list va;
     209    char   *pszBuffer;
     210
     211    va_start(va, pszFormat);
     212    RTStrAPrintfV(&pszBuffer, pszFormat, va);
     213    va_end(va);
     214
     215    return pszBuffer;
     216}
     217RT_EXPORT_SYMBOL(RTStrAPrintf2);
     218
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