VirtualBox

Changeset 85154 in vbox for trunk/include


Ignore:
Timestamp:
Jul 9, 2020 5:22:51 PM (5 years ago)
Author:
vboxsync
Message:

IPRT: Added RTStrSplit + testcases.

Location:
trunk/include/iprt
Files:
2 edited

Legend:

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

    r84379 r85154  
    21672167# define RTStrMemFind64                                 RT_MANGLER(RTStrMemFind64)
    21682168# define RTStrMemFind64_EndProc                         RT_MANGLER(RTStrMemFind64_EndProc)
     2169# define RTStrSplit                                     RT_MANGLER(RTStrSplit)
    21692170# define RTStrmClearError                               RT_MANGLER(RTStrmClearError)
    21702171# define RTStrmClose                                    RT_MANGLER(RTStrmClose)
  • trunk/include/iprt/string.h

    r85121 r85154  
    25152515
    25162516/**
     2517 * Splits a string buffer with a given separator into separate strings.
     2518 * If no separators are found, no strings are returned. Consequtive separators will be skipped.
     2519 *
     2520 * @returns iprt status code.
     2521 * @param   pcszStrings         String buffer to split.
     2522 * @param   cbStrings           Size (in bytes) of string buffer to split, including terminator.
     2523 * @param   pcszSeparator       Separator to use / find for splitting strings.
     2524 * @param   ppapszStrings       Where to return the allocated string array on success. Needs to be free'd by the caller.
     2525 * @param   pcStrings           Where to return the number of split strings in \a ppapszStrings.
     2526 */
     2527RTDECL(int) RTStrSplit(const char *pcszStrings, size_t cbStrings,
     2528                       const char *pcszSeparator, char ***ppapszStrings, size_t *pcStrings);
     2529
     2530/**
    25172531 * Locates a case sensitive substring.
    25182532 *
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