Changeset 70092 in vbox for trunk/src/VBox/Runtime/common/string
- Timestamp:
- Dec 12, 2017 6:25:40 PM (7 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/RTStrNICmpAscii.cpp
r70091 r70092 36 36 37 37 38 RTDECL(int) RTStr ICmpAscii(const char *psz1, const char *psz2)38 RTDECL(int) RTStrNICmpAscii(const char *psz1, const char *psz2, size_t cchMax) 39 39 { 40 if (cchMax == 0) 41 return 0; 40 42 if (psz1 == psz2) 41 43 return 0; … … 48 50 { 49 51 RTUNICP uc1; 50 int rc = RTStrGetCp Ex(&psz1, &uc1);52 int rc = RTStrGetCpNEx(&psz1, &cchMax, &uc1); 51 53 if (RT_SUCCESS(rc)) 52 54 { … … 72 74 /* Hit some bad encoding, continue in case sensitive mode. */ 73 75 else 74 return RTStr Cmp(psz1 - 1, psz2);76 return RTStrNCmp(psz1 - 1, psz2, cchMax + 1); 75 77 } 76 78 }
Note:
See TracChangeset
for help on using the changeset viewer.