Changeset 18589 in vbox for trunk/include
- Timestamp:
- Apr 1, 2009 9:11:02 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/string.h
r18529 r18589 506 506 bool contains (const Utf8Str &that, CaseSensitivity cs = CaseSensitive) const 507 507 { 508 if (isNull() || that.isNull()) 509 return false; 510 511 char *pszString = ::RTStrDup(str); 512 char *pszTmp; 513 514 /* Create the generic pattern */ 515 ::RTStrAPrintf(&pszTmp, "*%s*", that.str); 516 /* We have to duplicate the strings as long as there is no case 517 * insensitive version of RTStrSimplePatternMatch. */ 518 if (cs == CaseInsensitive) 519 { 520 pszTmp = ::RTStrToLower(pszTmp); 521 pszString = ::RTStrToLower(pszString); 522 } 523 bool fResult = ::RTStrSimplePatternMatch(pszTmp, pszString); 524 RTStrFree(pszTmp); 525 RTStrFree(pszString); 526 527 return fResult; 508 if (cs == CaseSensitive) 509 return ::RTStrStr (str, that.str) != NULL; 510 else 511 return ::RTStrIStr (str, that.str) != NULL; 528 512 } 529 513
Note:
See TracChangeset
for help on using the changeset viewer.