VirtualBox

Changeset 18552 in vbox for trunk/include


Ignore:
Timestamp:
Mar 30, 2009 2:46:47 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45421
Message:

IPRT: Untested RTStrIStr and RTStrStr. (testcase is underways)

File:
1 edited

Legend:

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

    r18544 r18552  
    884884
    885885/**
     886 * Locates a case insensitive substring.
     887 *
     888 * If any of the two strings are NULL, then NULL is returned. If the needle is
     889 * an empty string, then the haystack is returned (i.e. matches anything).
     890 *
     891 * @returns Pointer to the first occurance of the substring if found, NULL if
     892 *          not.
     893 *
     894 * @param   pszHaystack The string to search.
     895 * @param   pszNeedle   The substring to search for.
     896 *
     897 * @remarks The difference between this and strstr is the handling of NULL
     898 *          pointers.s
     899 */
     900RTDECL(char *) RTStrStr(const char *pszHaystack, const char *pszNeedle);
     901
     902/**
     903 * Locates a case insensitive substring.
     904 *
     905 * If any of the two strings are NULL, then NULL is returned. If the needle is
     906 * an empty string, then the haystack is returned (i.e. matches anything).
     907 *
     908 * @returns Pointer to the first occurance of the substring if found, NULL if
     909 *          not.
     910 *
     911 * @param   pszHaystack The string to search.
     912 * @param   pszNeedle   The substring to search for.
     913 *
     914 */
     915RTDECL(char *) RTStrIStr(const char *pszHaystack, const char *pszNeedle);
     916
     917/**
     918 * Converts the string to lower case.
     919 *
     920 * @returns Pointer to the converted string.
     921 * @param   psz     The string to convert.
     922 */
     923RTDECL(char *) RTStrToLower(char *psz);
     924
     925/**
     926 * Converts the string to upper case.
     927 *
     928 * @returns Pointer to the converted string.
     929 * @param   psz     The string to convert.
     930 */
     931RTDECL(char *) RTStrToUpper(char *psz);
     932
     933/**
    886934 * Find the length of a zero-terminated byte string, given
    887935 * a max string length.
     
    9691017                                          const char *pszString, size_t cchString,
    9701018                                          size_t *poffPattern);
    971 
    972 /**
    973  * Converts the string to lower case.
    974  *
    975  * @returns Pointer to the converted string.
    976  * @param   psz     The string to convert.
    977  */
    978 RTDECL(char *) RTStrToLower(char *psz);
    979 
    980 /**
    981  * Converts the string to upper case.
    982  *
    983  * @returns Pointer to the converted string.
    984  * @param   psz     The string to convert.
    985  */
    986 RTDECL(char *) RTStrToUpper(char *psz);
    9871019
    9881020
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette