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


C++ AsString函数代码示例

本文整理汇总了C++中AsString函数的典型用法代码示例。如果您正苦于以下问题:C++ AsString函数的具体用法?C++ AsString怎么用?C++ AsString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: MakeInvocation

static FObject MakeInvocation(int argc, FChS * argv[])
{
    uint_t sl = -1;

    for (int adx = 0; adx < argc; adx++)
        sl += StringLengthS(argv[adx]) + 1;

    FObject s = MakeString(0, sl);
    uint_t sdx = 0;

    for (int adx = 0; adx < argc; adx++)
    {
        sl = StringLengthS(argv[adx]);
        for (uint_t idx = 0; idx < sl; idx++)
        {
            AsString(s)->String[sdx] = argv[adx][idx];
            sdx += 1;
        }

        if (adx + 1 < argc)
        {
            AsString(s)->String[sdx] = ' ';
            sdx += 1;
        }
    }

    return(s);
}
开发者ID:beimprovised,项目名称:foment,代码行数:28,代码来源:main.cpp

示例2: AsString

mf::http::SharedBuffer::Pointer Impl::GetPostData()
{
    std::map<std::string, std::string> parts;

    if (quickkey_)
        parts["quick_key"] = *quickkey_;
    if (get_counts_only_)
        parts["get_counts_only"] = AsString(*get_counts_only_);
    if (duration_minutes_)
        parts["duration"] = AsString(*duration_minutes_);
    if (nofify_owner_on_access_)
        parts["email_notification"] = AsString(*nofify_owner_on_access_);
    if (success_callback_url_)
        parts["success_callback_url"] = *success_callback_url_;
    if (error_callback_url_)
        parts["error_callback_url"] = *error_callback_url_;
    if (bind_ip_)
        parts["bind_ip"] = *bind_ip_;
    if (burn_after_use_)
        parts["burn_after_use"] = AsString(*burn_after_use_);

    std::string post_data = MakePost(api_path + ".php", parts);
    AddDebugText(" POST data: " + post_data + "\n");
    return mf::http::SharedBuffer::Create(post_data);
}
开发者ID:MediaFire,项目名称:mediafire-cpp-sdk,代码行数:25,代码来源:v1_1.cpp

示例3: switch

String RichPara::Number::AsText(const RichPara::NumberFormat& format) const
{
	String result;
	for(int i = 0; i < 8; i++)
		if(format.number[i]) {
			if(result.GetLength())
				result.Cat('.');
			int q = n[i];
			switch(format.number[i]) {
			case NUMBER_1:
				result << AsString(q);
				break;
			case NUMBER_0:
				result << AsString(q - 1);
				break;
			case NUMBER_a:
				result << FormatIntAlpha(q, false);
				break;
			case NUMBER_A:
				result << FormatIntAlpha(q, true);
				break;
			case NUMBER_i:
				result << FormatIntRoman(q, false);
				break;
			case NUMBER_I:
				result << FormatIntRoman(q, true);
				break;
			}
		}
	return format.before_number + result + format.after_number;
}
开发者ID:pedia,项目名称:raidget,代码行数:31,代码来源:ParaData.cpp

示例4: AddFontResourceExW

void    plWinFontCache::ILoadCustomFonts( void )
{
    if( fCustFontDir == nil )
        return;

    // Iterate through all the custom fonts in our dir
    int numAdded;

    std::vector<plFileName> fonts = plFileSystem::ListDir(fCustFontDir, kCustFontExtension);
    for (auto iter = fonts.begin(); iter != fonts.end(); ++iter)
    {
        // Note that this call can be translated as "does my OS suck?"
#if (_WIN32_WINNT >= 0x0500)
        if( plDynSurfaceWriter::CanHandleLotsOfThem() )
            numAdded = AddFontResourceExW(iter->AsString().ToWchar(), FR_PRIVATE, 0);
        else
#endif
            numAdded = AddFontResourceW(iter->AsString().ToWchar());

        if( numAdded > 0 )
        {
            plStatusLog::AddLineS( "pipeline.log", "WinFontCache: Added custom font %s, %d fonts", iter->GetFileName().c_str(), numAdded );
            fCustFonts.Append(new plCustFont(*iter));
        }
        else
        {
            plStatusLog::AddLineS( "pipeline.log", "WinFontCache: Unable to load custom font %s", iter->GetFileName().c_str() );
        }
    }
}
开发者ID:Asteral,项目名称:Plasma,代码行数:30,代码来源:plWinFontCache.cpp

示例5: Clear

void defList::Load(String filePath)
{
	Clear() ;

	path = filePath ;
	name = GetFileTitle(path) ;
	VectorMap<String,String> ini = LoadIniFile(path) ;
	fields = Split(ini.Get("fields", ""), ',' ) ;

	CSVParser csv ;
	for( int i=0; true; i++)
	{
		String s = ini.Get("data_" + AsString(i), "") ;
		if (s.IsEmpty())
			break ;

		data.Add(csv.ParseLine(s, fields.GetCount()) ) ;
	}

	for (int i=0; true; i++)
	{
		String s = ini.Get("error_" + AsString(i), "") ;
		if (s.IsEmpty())
			break ;
		errors.Add(s) ;
	}


	// guardamos este como último cargado
	theCfg.lastList = path ;
	theCfg.Save() ;

}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:33,代码来源:cfg.cpp

示例6: AsString

void InvoiceList::formatHeader(StringBuffer &buf)
{
	buf.Cat("{{1:1~ ");
	buf.Cat("[*A3 " + AsString(t_("Invoice list")) + "] :: [*A3 ]:: ");
	buf.Cat("[A1 " + AsString(t_("Date from:")) + "-|" + AsString(from));
	buf.Cat("&" + AsString(t_("Date to:")) + "-|" + AsString(to));
	buf.Cat("]:: ");
	buf.Cat("}}");
}
开发者ID:jkusniar,项目名称:tara,代码行数:9,代码来源:invoicelist.cpp

示例7: return

Value Compiler::ExeNeq::Eval(ExeContext& x) const
{
	Value v1 = a->Eval(x);
	Value v2 = b->Eval(x);
	if(IsString(v1) && IsString(v2))
		return (String)v1 != (String)v2;
	if(IsNumber(v1) && IsNumber(v2))
		return (double)v1 != (double)v2;
	return AsString(v1) != AsString(v2);
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:10,代码来源:Exe.cpp

示例8: AsString

void InvoiceFormatter::formatHeader(StringBuffer &buf, InvoiceData &invoice) {
	buf.Cat("{{1:1~ ");
	buf.Cat("[*A3 " + AsString(t_("Invoice")) + "] :: [*A3 " + AsString(t_("invoice num:")) + " " + AsString(invoice.inv_id) + "]:: ");
	buf.Cat("[A1 " + AsString(t_("Create date:")) + "-|-|-|" + AsString(invoice.create_date));
	if (lang != LANG_CZ) {
		buf.Cat("&" + AsString(t_("Delivery date:")) + "-|-|" + AsString(invoice.delivery_date) + "&");
		buf.Cat(AsString(t_("Payment date:")) + "-|-|-|" + AsString(invoice.payment_date) );
	}
	buf.Cat("]:: ");
	
	// no payment type in CZ
	if (lang != LANG_CZ) {
		String type;
		switch (invoice.payment_type)
		{
				case iptCurrency:
					type = t_("currency");
					break;
				case iptBankTransfer:
					type = t_("bank transfer");
					break;
				
				default:
					type = t_("currency");
		}
		
		buf.Cat("[A1 " + AsString(t_("Payment type:")) + "-|-|" + type + "]&");
	}
	buf.Cat("}}");
}
开发者ID:jkusniar,项目名称:tara,代码行数:30,代码来源:invoice.cpp

示例9: GetVolumeSn

String GetVolumeSn(const String &vol, int len) {
	dword sn;
	
	// Win API
	if(!GetVolumeInformation(vol, NULL, 0, &sn, NULL, NULL, NULL, 0)) sn = 71511731;
#ifdef _WITH_DEBUG
RLOG("GetVolumeSn():sn = " + AsString(sn));
#endif	
	
	return String(AsString(sn)).Right(len);
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:11,代码来源:utils.cpp

示例10: AsString

mf::http::SharedBuffer::Pointer Impl::GetPostData()
{
    std::map<std::string, std::string> parts;

    parts["quick_key"] = AsString(quickkeys_);
    if (link_types_)
        parts["link_type"] = AsString(*link_types_);

    std::string post_data = MakePost(api_path + ".php", parts);
    AddDebugText(" POST data: " + post_data + "\n");
    return mf::http::SharedBuffer::Create(post_data);
}
开发者ID:herbertjones,项目名称:mediafire-cpp-sdk,代码行数:12,代码来源:v1_3.cpp

示例11: AsString

void Ide::AddFoundFile(const String& fn, int ln, const String& line, int pos, int count)
{
	ErrorInfo f;
	f.file = fn;
	f.lineno = ln;
	f.linepos = 0;
	f.kind = 0;
	f.message = "\1" + EditorSyntax::GetSyntaxForFilename(fn) + "\1" +
	            AsString(pos) + "\1" + AsString(count) + "\1" + line;
	ffound.Add(fn, ln, f.message, RawToValue(f));
	ffound.Sync();
}
开发者ID:ultimatepp,项目名称:mirror,代码行数:12,代码来源:FindInFiles.cpp

示例12: AsString

mf::http::SharedBuffer::Pointer Impl::GetPostData()
{
    std::map<std::string, std::string> parts;

    parts["quick_key"] = quickkey_;
    parts["source_revision"] = AsString(source_revision_);
    parts["target_revision"] = AsString(target_revision_);

    std::string post_data = MakePost(api_path + ".php", parts);
    AddDebugText(" POST data: " + post_data + "\n");
    return mf::http::SharedBuffer::Create(post_data);
}
开发者ID:dazw666,项目名称:mediafire-cpp-sdk,代码行数:12,代码来源:v0.cpp

示例13: AsString

mf::http::SharedBuffer::Pointer Impl::GetPostData()
{
    std::map<std::string, std::string> parts;

    if (product_id_)
        parts["product_id"] = AsString(*product_id_);
    if (family_)
        parts["family"] = AsString(*family_);

    std::string post_data = MakePost(api_path + ".php", parts);
    AddDebugText(" POST data: " + post_data + "\n");
    return mf::http::SharedBuffer::Create(post_data);
}
开发者ID:herbertjones,项目名称:mediafire-cpp-sdk,代码行数:13,代码来源:v1_1.cpp

示例14: Format

//Вывод в файл список в формате Оригинал - Русское - количество эпизодов
void AnimeList::PrintFile()
{
	if(!fs.ExecuteSaveAs()) return;
	String printfile = fs;
	
	String xml, name, namerus, episodes;
	for(int i = 0; i < listName.GetCount(); i++)
	{	
		xml += Format(AsString(listName.Get(i, Named)) + " - " + AsString(listName.Get(i, NamedRus)) + " - Episodes: %d", listName.Get(i, Episodes));
		RawCat(xml, "\r\n");
	}
	
	if(!SaveFile(printfile, xml))
		Exclamation("Error Saving the File");
}
开发者ID:MagistrTot,项目名称:AnimeListOld,代码行数:16,代码来源:main.cpp

示例15: AsString

mf::http::SharedBuffer::Pointer Impl::GetPostData()
{
    std::map<std::string, std::string> parts;

    if (previous_file_versions_)
        parts["previous_file_versions"] = AsString(*previous_file_versions_);
    if (default_share_link_status_)
        parts["default_share_link_status"] = AsString(*default_share_link_status_);
    if (collect_metadata_)
        parts["collect_metadata"] = AsString(*collect_metadata_);

    std::string post_data = MakePost(api_path + ".php", parts);
    AddDebugText(" POST data: " + post_data + "\n");
    return mf::http::SharedBuffer::Create(post_data);
}
开发者ID:MediaFire,项目名称:mediafire-cpp-sdk,代码行数:15,代码来源:v1_3.cpp


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