这篇教程C++ CompareString函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CompareString函数的典型用法代码示例。如果您正苦于以下问题:C++ CompareString函数的具体用法?C++ CompareString怎么用?C++ CompareString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CompareString函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DSEnumProcBOOL CALLBACK DSEnumProc(LPGUID lpGUID, LPCTSTR lpszDesc, LPCTSTR lpszDrvName, LPVOID lpContext){ LPGUID* pGUID = (LPGUID*)lpContext; if (pGUID == NULL) { return FALSE; } if ((*pGUID) != NULL) { return TRUE; } if (lpGUID != NULL) { // XP, 2k if ((CompareString(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), NORM_IGNORECASE, lpszDrvName, -1, TEXT("cmipci.sys"), -1) == CSTR_EQUAL) && (CompareString(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), NORM_IGNORECASE, lpszDesc, -1, TEXT("CMI8738/8768 Wave"), -1) == CSTR_EQUAL)) { (*pGUID) = (LPGUID)LocalAlloc(LPTR, sizeof(GUID)); memcpy((*pGUID), lpGUID, sizeof(GUID)); return TRUE; } // Vista if (CompareString(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), NORM_IGNORECASE, lpszDesc, -1, TEXT("Speakers (CMI8738/8768 Audio Device)"), -1) == CSTR_EQUAL) { (*pGUID) = (LPGUID)LocalAlloc(LPTR, sizeof(GUID)); memcpy((*pGUID), lpGUID, sizeof(GUID)); return TRUE; } } return TRUE;}
开发者ID:hoangduit,项目名称:reactos,代码行数:28,
示例2: FilenameCompareint FilenameCompare( const TCHAR * pa, const TCHAR * pb ){ int diff = CompareString( LOCALE_USER_DEFAULT, NORM_IGNORECASE|NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH, pa, -1, pb, -1 ); if ( diff == CSTR_EQUAL ) diff = CompareString( LOCALE_USER_DEFAULT, SORT_STRINGSORT, pa, -1, pb, -1 ); return diff - CSTR_EQUAL;}
开发者ID:caidongyun,项目名称:libs,代码行数:7,
示例3: intlong CDistDatabaseReactor::SelectRowId(int& nRowId,const char* strCadLyName,const char *strSdeLyName,int nIndex,AcDbDatabase* pDB){ int nResult = 0; DIST_STRUCT_CHANGEROWID* pTemp = m_pRowIdData; int nID = int(pDB); nRowId = -1; while(pTemp != NULL) { if(nID == pTemp->nID && CompareString(strCadLyName,pTemp->strCadLyName)==0 && CompareString(strSdeLyName,pTemp->strSdeLyName)==0) { int nCount = pTemp->RowIdArray.GetSize(); if(nIndex>=0 && nIndex < nCount) { nRowId = pTemp->RowIdArray.GetAt(nIndex); nResult = 1; } break; } pTemp = pTemp->pNext; } return nResult;}
开发者ID:fredrikjonsson,项目名称:cadof72bian,代码行数:26,
示例4: BootUpModulevoid BootUpModule(void) { typedef enum { Bootup1, Passed, Error } BootUpState_Type; BootUpState_Type BootUpState = Bootup1; while (BootUpState != Passed) { switch (BootUpState) { case Bootup1: SendSim900("AT+Bootup/r/n"); if (CompareString(buffer, "OK", 2)) { //are the same FRTOS1_xSemaphoreGive(SuccessLedMutex); BootUpState = Passed; } break; default: BootUpState = Error; break; } FRTOS1_vTaskDelay(BOOTUP_STATEMACHINE_DELAY_MS/portTICK_PERIOD_MS); }}
开发者ID:tghaefli,项目名称:stingray,代码行数:26,
示例5: CompareNoCaseint FarString::CompareNoCase (const char * Str, size_t nLength) const{ if (nLength > fData->fLength+1) nLength = fData->fLength+1; return 2-CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE, fData->fText, nLength, Str, nLength);}
开发者ID:Maximus5,项目名称:evil-programmers,代码行数:7,
示例6: CompareListItemstatic int CALLBACK CompareListItem(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort){ int cmp = CompareString((LCID)lParamSort, 0, ((LANGPACK_INFO*)lParam1)->szLanguage, -1, ((LANGPACK_INFO*)lParam2)->szLanguage, -1); if (cmp != 0) cmp -= 2; return cmp;}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:7,
示例7: mainint main() { Student stus[] = {{"a",10},{"b",50},{"c",20}}; for(Student* s=stus;s!=stus+3;++s){ std::cout<<s->name<<" "<<s->score<<"/n"; } Student *end = stus + sizeof(stus)/sizeof(stus[0]); Student *best = bestStudent(stus,end,&compareStudentScore); std::cout<<(*best).name<<"~~~~~~~~~~~"<<(*best).score<<std::endl; int num[] = {1,2,4,6,8,2,4}; int *nEnd = num + sizeof(num)/sizeof(num[0]); { int *high = bestStudent(num,nEnd,&compareInt); std::cout<<*high<<std::endl; } { Compare2 comp; comp(3,6); int *high = bestStudent(num,nEnd,comp); std::cout<<*high<<std::endl; } const char* strs[]={"dsifewnrfsdfawoewaf","1654sdaf","w3rewasa3","29ajfdsof93"}; const char **last = strs + sizeof(strs)/sizeof(strs[0]); std::sort(strs,last,CompareString()); for(int i=0;i<4;i++) { std::cout<<strs[i]<<std::endl; } return 0;}
开发者ID:amberyang,项目名称:exercise,代码行数:35,
示例8: HRESULT_exception_Use_decl_annotations_DX9_exception::DX9_exception(HRESULT hr, const char* file_name, int line) noexcept : HRESULT_exception(hr, file_name, line){ try { WCHAR wide_error_string[1024]; PCWSTR dx_message = DXGetErrorStringW(m_hr); if(CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, dx_message, -1, TEXT("Unknown"), -1) == CSTR_EQUAL) { assert(!"DX error string could not be found. Was check_hr intended?"); dx_message = L"Unknown error."; } StringCchPrintfW(wide_error_string, ARRAYSIZE(wide_error_string), L"Error: %08x: %s", m_hr, dx_message); const auto error_string = PortableRuntime::utf8_from_utf16(wide_error_string); PortableRuntime::dprintf("!%s(%d): %s/n", file_name, line, error_string.c_str()); // Just save off the message now, but do the full formatting in what(), to allow exception unwind to free up some resources. m_what = std::make_shared<std::string>(std::move(error_string)); } catch(const std::bad_alloc& ex) { (void)ex; // Unreferenced parameter. PortableRuntime::dprintf("!Failed creation of exception object./n"); }}
开发者ID:AceRoqs,项目名称:3DDemo,代码行数:28,
示例9: GetConnectionvoid GetConnection(void) { typedef enum { GetCon1, Passed, Error } GetConState_Type; GetConState_Type GetConState = GetCon1; while (GetConState != Passed) { switch (GetConState) { case GetCon1: SendSim900("AT+GetConnection/r/n"); if (CompareString(buffer, "ok", 2)) { //are the same FRTOS1_xSemaphoreGive(SuccessLedMutex); GetConState = Passed; } break; default: GetConState = Error; break; } FRTOS1_vTaskDelay( GET_CONNECTION_STATEMACHINE_DELAY_MS/portTICK_PERIOD_MS); }}
开发者ID:tghaefli,项目名称:stingray,代码行数:27,
示例10: getDeviceInfoBOOL getDeviceInfo(const GUID* category, CMIDEV* pDev){ TCHAR szServiceName[128]; int nIndex = 0; pDev->Info = SetupDiGetClassDevs(category, NULL, NULL, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); if (pDev->Info == INVALID_HANDLE_VALUE) { PrintLastError("SetupDiGetClassDevs()"); return FALSE; } pDev->InfoData.cbSize = sizeof(SP_DEVINFO_DATA); while (SetupDiEnumDeviceInfo(pDev->Info, nIndex, &(pDev->InfoData))) { if (!SetupDiGetDeviceRegistryProperty(pDev->Info, &(pDev->InfoData), SPDRP_SERVICE, NULL, (PBYTE)szServiceName, sizeof(szServiceName), NULL)) { PrintLastError("SetupDiGetDeviceRegistryProperty()"); SetupDiDestroyDeviceInfoList(pDev->Info); pDev->Info = NULL; return FALSE; } if (CompareString(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), NORM_IGNORECASE, szServiceName, -1, TEXT("cmipci"), -1) == CSTR_EQUAL) { return TRUE; } nIndex++; } SetupDiDestroyDeviceInfoList(pDev->Info); pDev->Info = NULL; return FALSE;}
开发者ID:hoangduit,项目名称:reactos,代码行数:31,
示例11: _mbsnbicollint _RTLENTRY _EXPFUNC _mbsnbicoll( const unsigned char *__S1, const unsigned char *__S2, size_t n ){ int ret; ret = CompareString ( __locale->handle, NORM_IGNORECASE, (LPCTSTR)__S1, n, (LPCTSTR)__S2, n ); return (ret-2);}
开发者ID:Mephistophil,项目名称:linked_list,代码行数:7,
示例12: findWaveDeviceIDUINT findWaveDeviceID(){ WAVEOUTCAPS woc; UINT i, numDev; numDev = waveOutGetNumDevs(); for (i=0;i<numDev;i++) { if (!waveOutGetDevCaps(i, &woc, sizeof(WAVEOUTCAPS))) { if ((CompareString(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), NORM_IGNORECASE, woc.szPname, -1, TEXT("CMI8738/8768 Wave"), -1) == CSTR_EQUAL) || (CompareString(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT), NORM_IGNORECASE, woc.szPname, -1, TEXT("Speakers (CMI8738/8768 Audio De"), -1) == CSTR_EQUAL)) { return i; } } } return WAVE_MAPPER;}
开发者ID:hoangduit,项目名称:reactos,代码行数:16,
示例13: GetIDsOfNamesSTDMETHODIMP CImpIDispatch::GetIDsOfNames( /* [in] */ REFIID riid, /* [size_is][in] */ OLECHAR** rgszNames, /* [in] */ UINT cNames, /* [in] */ LCID lcid, /* [size_is][out] */ DISPID* rgDispId){ HRESULT hr; UINT i; // Assume some degree of success hr = NOERROR; // Hardcoded mapping for this sample // A more usual procedure would be to use a TypeInfo for ( i=0; i < cNames; i++) { if ( 2 == CompareString( lcid, NORM_IGNOREWIDTH, (wchar_t*)pszExtend, 3, (wchar_t*)rgszNames[i], 3 ) ) { rgDispId[i] = DISPID_Extend; } else { // One or more are unknown so set the return code accordingly hr = ResultFromScode(DISP_E_UNKNOWNNAME); rgDispId[i] = DISPID_UNKNOWN; } } return hr;}
开发者ID:assafyariv,项目名称:PSG,代码行数:30,
示例14: LGetSelectedCellCommonstatic Boolean LGetSelectedCellCommon(ListHandle listH, Cell *listCell, GetListCellTextProcType getCellText, Boolean first) /* This function finds the alphabetically first or last cell (depending on the value of first) in the currently selected cells of the list. It returns false if there are no selected cells. */{ Boolean result; Str255 cellText; Str255 bestText; SInt16 indexOfBestText; assert(getCellText != NULL); // Establish some pre-conditions. result = false; listCell->h = 0; listCell->v = 0; indexOfBestText = 0; if (first) { bestText[0] = 0; bestText[1] = 255; bestText[2] = 255; } else { bestText[0] = 0; } // Loop through the selected cells, looking for the best text (ie the // alphabetically first or last). while ( LGetSelect(true, listCell, listH) ) { result = true; getCellText(listH, listCell, cellText); if ( (first && (CompareString(cellText, bestText, NULL) < 0)) || (!first && (CompareString(cellText, bestText, NULL) > 0)) ) { indexOfBestText = listCell->v; BlockMoveData(cellText, bestText, cellText[0] + 1); } listCell->v += 1; } // Finish up. listCell->h = 0; listCell->v = indexOfBestText; return result;}
开发者ID:fruitsamples,项目名称:MoreIsBetter,代码行数:47,
示例15: cliCompareContactsint cliCompareContacts(const ClcContact *contact1, const ClcContact *contact2){ ClcCacheEntry *c1 = contact1->pce, *c2 = contact2->pce; for (int i = 0; i < _countof(g_CluiData.bSortByOrder); i++) { BYTE &by = g_CluiData.bSortByOrder[i]; if (by == SORTBY_STATUS) { //status int ordera = GetStatusModeOrdering(c1->getStatus()); int orderb = GetStatusModeOrdering(c2->getStatus()); if (ordera == orderb) continue; return ordera - orderb; } // one is offline: offline goes below online if (!g_CluiData.fSortNoOfflineBottom) { int statusa = c1->getStatus(); int statusb = c2->getStatus(); if ((statusa == ID_STATUS_OFFLINE) != (statusb == ID_STATUS_OFFLINE)) return 2 * (statusa == ID_STATUS_OFFLINE) - 1; } int r = 0; switch (by) { case SORTBY_NAME: // name r = mir_wstrcmpi(contact1->szText, contact2->szText); break; case SORTBY_NAME_LOCALE: // name if (LocaleId == -1) LocaleId = Langpack_GetDefaultLocale(); r = CompareString(LocaleId, NORM_IGNORECASE, SAFETSTRING(contact1->szText), -1, SAFETSTRING(contact2->szText), -1) - 2; break; case SORTBY_LASTMSG: // last message r = (int)CompareContacts2_getLMTime(contact2->hContact) - (int)CompareContacts2_getLMTime(contact1->hContact); break; case SORTBY_PROTO: if (contact1->proto == nullptr || contact2->proto == nullptr) continue; r = GetProtoIndex(contact1->proto) - GetProtoIndex(contact2->proto); break; case SORTBY_RATE: r = contact2->bContactRate - contact1->bContactRate; // reverse order break; default: // should never happen continue; } if (r != 0) return r; } return 0;}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:59,
示例16: CompareIntbool GlobalSearchSortModel::lessThan(const QModelIndex& left, const QModelIndex& right) const { const SearchProvider::Result r1 = left.data(GlobalSearchWidget::Role_PrimaryResult) .value<SearchProvider::Result>(); const SearchProvider::Result r2 = right.data(GlobalSearchWidget::Role_PrimaryResult) .value<SearchProvider::Result>(); // Order results that arrived first first, so that the results don't jump // around while the user is trying to navigate through them. const int order_left = left.data(GlobalSearchWidget::Role_OrderArrived).toInt(); const int order_right = right.data(GlobalSearchWidget::Role_OrderArrived).toInt(); if (order_left < order_right) return true; if (order_left > order_right) return false;#define CompareInt(field) / if (r1.field < r2.field) return true; / if (r1.field > r2.field) return false int ret = 0;#define CompareString(field) / ret = QString::localeAwareCompare(r1.metadata_.field(), r2.metadata_.field()); / if (ret < 0) return true; / if (ret > 0) return false // If they arrived at the same time then sort by quality and type. CompareInt(match_quality_); CompareInt(type_); // Failing that, compare title, artist and album switch (r1.type_) { case globalsearch::Type_Track: case globalsearch::Type_Stream: CompareString(title); // fallthrough case globalsearch::Type_Album: CompareString(artist); CompareString(album); break; } return false;#undef CompareInt#undef CompareString}
开发者ID:schalkpd,项目名称:clementine-subsonic,代码行数:46,
示例17: LoadExtraXMLSettingsvoid CFilterDialogPersistentSettings::LoadExtraXMLSettings(BSTR bstrName,BSTR bstrValue){ if(CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, bstrName, lstrlen(SETTING_FILTER_LIST), SETTING_FILTER_LIST, lstrlen(SETTING_FILTER_LIST)) == CSTR_EQUAL) { m_FilterList.push_back(bstrValue); }}
开发者ID:RenniePet,项目名称:explorerplusplus,代码行数:8,
示例18: CompareIntbool GlobalSearchSortModel::lessThan(const QModelIndex& left, const QModelIndex& right) const { // Compare the provider sort index first. const int index_left = left.data(GlobalSearchModel::Role_ProviderIndex).toInt(); const int index_right = right.data(GlobalSearchModel::Role_ProviderIndex).toInt(); if (index_left < index_right) return true; if (index_left > index_right) return false; // Dividers always go first if (left.data(LibraryModel::Role_IsDivider).toBool()) return true; if (right.data(LibraryModel::Role_IsDivider).toBool()) return false; // Containers go before songs if they're at the same level const bool left_is_container = left.data(LibraryModel::Role_ContainerType).isValid(); const bool right_is_container = right.data(LibraryModel::Role_ContainerType).isValid(); if (left_is_container && !right_is_container) return true; if (right_is_container && !left_is_container) return false; // Containers get sorted on their sort text. if (left_is_container) { return QString::localeAwareCompare( left.data(LibraryModel::Role_SortText).toString(), right.data(LibraryModel::Role_SortText).toString()) < 0; } // Otherwise we're comparing songs. Sort by disc, track, then title. const SearchProvider::Result r1 = left.data(GlobalSearchModel::Role_Result).value<SearchProvider::Result>(); const SearchProvider::Result r2 = right.data(GlobalSearchModel::Role_Result) .value<SearchProvider::Result>();#define CompareInt(field) / if (r1.metadata_.field() < r2.metadata_.field()) return true; / if (r1.metadata_.field() > r2.metadata_.field()) return false int ret = 0;#define CompareString(field) / ret = / QString::localeAwareCompare(r1.metadata_.field(), r2.metadata_.field()); / if (ret < 0) return true; / if (ret > 0) return false CompareInt(disc); CompareInt(track); CompareString(title); return false;#undef CompareInt#undef CompareString}
开发者ID:Aceler,项目名称:Clementine,代码行数:56,
示例19: MAKELCIDvoid CDxtexCommandLineInfo::ParseParam(const TCHAR* pszParam,BOOL bFlag,BOOL bLast){ DWORD lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); if( CompareString( lcid, NORM_IGNORECASE, pszParam, -1, TEXT("DXT1"), -1 ) == CSTR_EQUAL ) { m_fmt = D3DFMT_DXT1; } else if( CompareString( lcid, NORM_IGNORECASE, pszParam, -1, TEXT("DXT2"), -1 ) == CSTR_EQUAL ) { m_fmt = D3DFMT_DXT2; } else if( CompareString( lcid, NORM_IGNORECASE, pszParam, -1, TEXT("DXT3"), -1 ) == CSTR_EQUAL ) { m_fmt = D3DFMT_DXT3; } else if( CompareString( lcid, NORM_IGNORECASE, pszParam, -1, TEXT("DXT4"), -1 ) == CSTR_EQUAL ) { m_fmt = D3DFMT_DXT4; } else if( CompareString( lcid, NORM_IGNORECASE, pszParam, -1, TEXT("DXT5"), -1 ) == CSTR_EQUAL ) { m_fmt = D3DFMT_DXT5; } else if (bFlag && tolower(pszParam[0]) == 'a') { m_bAlphaComing = TRUE; } else if (!bFlag && m_bAlphaComing) { m_strFileNameAlpha = pszParam; m_bAlphaComing = FALSE; } else if (bFlag && tolower(pszParam[0]) == 'm') { m_bMipMap = TRUE; } else if (!bFlag && !m_strFileName.IsEmpty()) { m_strFileNameSave = pszParam; } CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:43,
示例20: CompareContacts2int CompareContacts2(const ClcContact *contact1, const ClcContact *contact2, int by){ TCHAR *namea, *nameb; int statusa, statusb; char *szProto1, *szProto2; if ((INT_PTR)contact1 < 100 || (INT_PTR)contact2 < 100) return 0; MCONTACT a = contact1->hContact; MCONTACT b = contact2->hContact; namea = (TCHAR *)contact1->szText; statusa = GetContactCachedStatus(contact1->hContact); szProto1 = contact1->proto; nameb = (TCHAR *)contact2->szText; statusb = GetContactCachedStatus(contact2->hContact); szProto2 = contact2->proto; if (by == SORTBY_STATUS) { //status int ordera, orderb; ordera = GetStatusModeOrdering(statusa); orderb = GetStatusModeOrdering(statusb); return (ordera != orderb) ? ordera - orderb : 0; } //one is offline: offline goes below online if (g_CluiData.fSortNoOfflineBottom == 0 && (statusa == ID_STATUS_OFFLINE) != (statusb == ID_STATUS_OFFLINE)) return 2 * (statusa == ID_STATUS_OFFLINE) - 1; if (by == SORTBY_NAME) //name return mir_tstrcmpi(namea, nameb); if (by == SORTBY_NAME_LOCALE) { //name static int LocaleId = -1; if (LocaleId == -1) LocaleId = Langpack_GetDefaultLocale(); return (CompareString(LocaleId, NORM_IGNORECASE, SAFETSTRING(namea), -1, SAFETSTRING(nameb), -1)) - 2; } if (by == SORTBY_LASTMSG) { //last message DWORD ta = CompareContacts2_getLMTime(a); DWORD tb = CompareContacts2_getLMTime(b); return tb - ta; } if (by == SORTBY_PROTO) { int rc = GetProtoIndex(szProto1) - GetProtoIndex(szProto2); if (rc != 0 && (szProto1 != NULL && szProto2 != NULL)) return rc; } else if (by == SORTBY_RATE) return contact2->bContactRate - contact1->bContactRate; // else :o) return 0;}
开发者ID:Seldom,项目名称:miranda-ng,代码行数:55,
示例21: far_assert// CP-1251// для сортированного массива эту операцию можно значительно ускорить,// но придется вводить дополнительный член класса (fSorted).// плюс если fSorted == true, то Insert делать сразу в нужную позицию.int FarStringArray::IndexOf( const char * item ){ far_assert( item != NULL ); int len = strlen( item ); for ( int i = 0; i < fCount; i++ ) { if ( CompareString( LOCALE_USER_DEFAULT, 0, At( i ), -1, item, len ) == CSTR_EQUAL ) return i; } return -1;}
开发者ID:Maximus5,项目名称:evil-programmers,代码行数:15,
示例22: switch//-------------------------------------------------------------------// Sort::CompareForMerge//// Input : Two tuples containint <record pointer, array index>// Output : None// Return : The comparison result//-------------------------------------------------------------------bool Sort::CompareForMerge(std::tuple<char *,int>& t1, std::tuple<char *,int>& t2) { switch (_sortType) { case attrInteger: return CompareInt(std::get<0>(t1),std::get<0>(t2))<0; break; case attrString: return CompareString(std::get<0>(t1),std::get<0>(t2))<0; default: break; }}
开发者ID:chongchong,项目名称:Project_4-Release,代码行数:18,
示例23: LoadExtraXMLSettingsvoid CWildcardSelectDialogPersistentSettings::LoadExtraXMLSettings(BSTR bstrName,BSTR bstrValue){ if(CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, bstrName, lstrlen(SETTING_PATTERN_LIST), SETTING_PATTERN_LIST, lstrlen(SETTING_PATTERN_LIST)) == CSTR_EQUAL) { m_PatternList.push_back(bstrValue); } else if(lstrcmpi(bstrName, SETTING_CURRENT_TEXT) == 0) { StringCchCopy(m_szPattern,SIZEOF_ARRAY(m_szPattern),bstrValue); }}
开发者ID:3scp8,项目名称:explorerplusplus,代码行数:12,
示例24: cmpstrint cmpstr( pubyte left, pubyte right, uint len ){ int ret; ret = CompareString( LOCALE_USER_DEFAULT, NORM_IGNORECASE, left, len, right, len ); if ( ret == CSTR_LESS_THAN ) return -1; if ( ret == CSTR_GREATER_THAN ) return 1; return 0;}
开发者ID:Refandler,项目名称:gentee,代码行数:12,
示例25: tcsncmpint tcsncmp(const tchar_t* a,const tchar_t* b,size_t n) { int i = CompareString(LOCALE_USER_DEFAULT,0,a,min(tcslen(a),n),b,min(tcslen(b),n)); if (i) return i-CSTR_EQUAL; // fallback#ifdef UNICODE return wcsncmp(a,b,n);#else return strncmp(a,b,n);#endif}
开发者ID:CDavantzis,项目名称:foundation-source,代码行数:13,
注:本文中的CompareString函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ Complete函数代码示例 C++ CompareMem函数代码示例 |