VirtualBox

Changeset 24893 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Nov 24, 2009 12:09:03 PM (15 years ago)
Author:
vboxsync
Message:

IPRT: Improved RTStrVersionCompare() + testcase.

File:
1 edited

Legend:

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

    r24639 r24893  
    10581058
    10591059/**
    1060  * Converts a string representation of a version number to an unsigned number.
     1060 * Compares two version strings and returns the result. The version string has
     1061 * to be made of at least one number section, each section delimited by a ".",
     1062 * e.g. "123.45.67". Trailing zeros at the beginning and non-digits in a section
     1063 * will be skipped, so "12.foo006" becomes "12.6".
    10611064 *
    10621065 * @returns iprt status code.
     
    10691072 * @retval  VERR_NO_DIGITS
    10701073 *
    1071  * @param   pszValue    Pointer to the string value.
    1072  * @param   pu32        Where to store the converted number.
    1073  */
    1074 RTDECL(int) RTStrVersionToUInt32(const char *pszVer, uint32_t *pu32);
     1074 * @todo    Deal with prefixes and suffixes!
     1075 * @param   pszVer1     First version string to compare.
     1076 * @param   pszVer2     First version string to compare.*
     1077 * @param   pui8Res     Pointer uint8_t value where to store the comparison result:
     1078 *                      0 if equal, 1 if pszVer1 is greater, 2 if pszVer2 is greater.
     1079 */
     1080RTDECL(int) RTStrVersionCompare(const char *pszVer1, const char *pszVer2, uint8_t *pui8Res);
    10751081
    10761082/**
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