当前位置: 首页>>代码示例>>C++>>正文


C++ TCString::Replace方法代码示例

本文整理汇总了C++中TCString::Replace方法的典型用法代码示例。如果您正苦于以下问题:C++ TCString::Replace方法的具体用法?C++ TCString::Replace怎么用?C++ TCString::Replace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TCString的用法示例。


在下文中一共展示了TCString::Replace方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Load

extern "C" int __declspec(dllexport) Load(void)
{
    mir_getLP(&pluginInfo);
    mir_getCLI();

    HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);

    Icon_Register(g_hInstance, MOD_NAME, iconList, _countof(iconList), "nas");

    InitCommonControls();
    InitOptions(); // must be called before we hook CallService

    if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) { // change all %nas_message% variables to %extratext% if it wasn't done before
        TCString Str = db_get_s(NULL, MOD_NAME, "PopupsFormat", _T(""));
        if (Str.GetLen())
            db_set_ts(NULL, MOD_NAME, "PopupsFormat", Str.Replace(_T("nas_message"), _T("extratext")));

        Str = db_get_s(NULL, MOD_NAME, "ReplyPrefix", _T(""));
        if (Str.GetLen())
            db_set_ts(NULL, MOD_NAME, "ReplyPrefix", Str.Replace(_T("nas_message"), _T("extratext")));
    }
    if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 2) { // disable autoreply for not-on-list contacts, as such contact may be a spam bot
        db_set_b(NULL, MOD_NAME, ContactStatusToDBSetting(0, DB_ENABLEREPLY, 0, INVALID_CONTACT_ID), 0);
        db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 2);
    }
    return 0;
}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:27,代码来源:AwaySys.cpp

示例2: Load

int CMPlugin::Load()
{
	HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
	DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, THREAD_SET_CONTEXT, false, 0);
	InitOptions();

	if (db_get_b(NULL, MODULENAME, DB_SETTINGSVER, 0) < 1) {
		TCString Str;
		Str = db_get_s(NULL, MODULENAME, DB_IGNORESUBSTRINGS, L"");
		if (Str.GetLen()) // fix incorrect regexp from v0.1.1.0
			db_set_ws(NULL, MODULENAME, DB_IGNORESUBSTRINGS, Str.Replace(L"/Miranda[0-9A-F]{8}/", L"/[0-9A-F]{8}(\\W|$)/"));

		db_set_b(NULL, MODULENAME, DB_SETTINGSVER, 1);
	}
	return 0;
}
开发者ID:tweimer,项目名称:miranda-ng,代码行数:16,代码来源:ClientChangeNotify.cpp

示例3: Load

extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP( &pluginInfo );

	HookEvent(ME_SYSTEM_MODULESLOADED, MirandaLoaded);
	DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &g_hMainThread, THREAD_SET_CONTEXT, false, 0);
	InitOptions();

	if (db_get_b(NULL, MOD_NAME, DB_SETTINGSVER, 0) < 1) {
		TCString Str;
		Str = db_get_s(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, _T(""));
		if (Str.GetLen()) // fix incorrect regexp from v0.1.1.0
			db_set_ts(NULL, MOD_NAME, DB_IGNORESUBSTRINGS, Str.Replace(_T("/Miranda[0-9A-F]{8}/"), _T("/[0-9A-F]{8}(\\W|$)/")));

		db_set_b(NULL, MOD_NAME, DB_SETTINGSVER, 1);
	}
	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:18,代码来源:ClientChangeNotify.cpp


注:本文中的TCString::Replace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。